创建MA模型图/创建MP,MA模型建立不同文件夹内/获取taskidSQL改变

This commit is contained in:
zhal 2022-08-26 14:09:05 +08:00
parent b248056865
commit ba2d01c18f
15 changed files with 343 additions and 35 deletions

View File

@ -47,10 +47,15 @@
<big5><![CDATA[流程圖]]></big5>
</item>
<item key="control.kpi">
<cn><![CDATA[流程绩效]]></cn>
<cn><![CDATA[末级流程绩效]]></cn>
<en><![CDATA[Process.Kpi]]></en>
<big5><![CDATA[流程KPI图]]></big5>
</item>
</item>
<item key="control.ma">
<cn><![CDATA[L1-L3流程绩效指标]]></cn>
<en><![CDATA[Control.Ma]]></en>
<big5><![CDATA[L1-L3流程绩效指标]]></big5>
</item>
<item key="process.epc">
<cn><![CDATA[EPC]]></cn>
<en><![CDATA[Process.Epc]]></en>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<attributes type="customer">
<attribute key="Number_of_the_associated_flow_file" title="关联流程编号" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="关联流程编号" isRequired="true"/>
<attribute key="Associated_process_name" title="关联流程名称" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="关联流程名称" isRequired="true"/>
<attribute key="Process_performance_indicator_Number" title="指标编号" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="指标编号" isRequired="true"/>
<attribute key="Name_process_performance_indicator" title="指标名称" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="指标名称" isRequired="true"/>
<attribute key="ndicator_User_defined_label" title="指标自定义标签" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="指标自定义标签" isRequired="true"/>
<attribute key="unit_measurement" title="计量单位" type="select" value="" ref="天,%,金额" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="计量单位" isRequired="true"/>
<attribute key="statistical_period" title="统计周期" type="select" value="" ref="月度,季度,半年度,年度" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="统计周期" isRequired="true"/>
<attribute key="Platform_data_Display" title="平台数据展示" type="select" value="" ref="是,否" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="平台数据展示" isRequired="true"/>
<attribute key="The_upstream_indicators" title="上游指标" type="relation" value="" ref="{&quot;method&quot;:&quot;process&quot;,&quot;type&quot;:&quot;shape&quot;,&quot;multiple&quot;:false}" readonly="true" groupPath="baseAttribute" scope="*" isValid="true" desc="上游指标" isRequired="true"/>
<attribute key="Downstream_target" title="下游指标" type="relation" value="" ref="{&quot;method&quot;:&quot;process&quot;,&quot;type&quot;:&quot;shape&quot;,&quot;multiple&quot;:false}" readonly="true" groupPath="baseAttribute" scope="*" isValid="true" desc="下游指标" isRequired="true"/>
<attribute key="Index_definition" title="指标定义" type="textarea" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="指标定义" isRequired="true"/>
<attribute key="remark" title="备注" type="textarea" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="备注" isRequired="false"/>
<attribute key="Process_Architecture_L1" title="L1" type="string" value="" desc="L1" isRequired="true" ref="" readonly="true" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="Process_Architecture_L2" title="L2" type="string" value="" desc="L2" isRequired="true" ref="" readonly="true" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="Process_Architecture_L3" title="L3" type="string" value="" desc="L3" isRequired="true" ref="" readonly="true" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="set_the_purpose" title="设置目的" type="string" value="" desc="设置目的" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="explain" title="说明" type="string" value="" desc="说明" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="number" title="编号" type="string" value="" desc="编号" isRequired="true" ref="" readonly="false" groupPath="baseAttribute" scope="%,*" isValid="true"/>
<attribute key="desc" title="描述" type="textarea" value="" desc="描述" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="%,*" isValid="true"/>
<attribute key="level" title="层次" type="string" value="" desc="层次" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="%,*" isValid="true"/>
<attribute key="target_value" title="指标值" type="string" value="" desc="指标值" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="%,*" isValid="true"/>
<attribute key="element" title="元素" type="table" value="" desc="元素" isRequired="false" ref="{&quot;firstColumn&quot;:&quot;元素&quot;,&quot;secondColumn&quot;:&quot;数据来源&quot;}" readonly="false" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="Data_fetch_logic" title="数据取数逻辑" type="textarea" value="" desc="数据取数逻辑" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="Take_the_number_aperture" title="取数路径" type="textarea" value="" desc="取数路径" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="data_sources" title="数据来源" type="textarea" value="" desc="数据来源" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="computational_formula" title="计算公式" type="textarea" value="" desc="计算公式" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true"/>
</attributes>

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
特性设置非必须多个app提供该Method Attribute时追加定义作用范围该MethodId对象。
被ResourceScanner扫描器检查更新
-->
<attributes>
<!--
分组
name 组名称
parentName 上级组名称,若根此处可空
desc 简要说明
<group name="AWS" parentName="" desc="AWS BPMS名称"/>
<group name="Process" parentName="AWS" desc="Process名称"/>-->
<group name="baseAttribute" parentName="" desc="基本属性"/>
<group name="targetCount" parentName="" desc="指标计算"/>
<!--
扩展特性(属性)
key 全局唯一标识名
title 属性标题
type 属性类型支持string(普通字符串),number(数字),boolean(是非),list(多选值),link(链接),relation(关联关系),textarea(多行文本)
value 默认值//支持@公式
ref 当type=list时参考值
readonly 是否只读
groupPath 特性绑定在哪个组别上
scope 应用范围methodId、methodId.shapeId多个用逗号隔开%代表文件属性 *代表对所有的图形有效,不是文件属性
- 组织-执行部门
- 流程分析-处理时间
- 流程分析-等待时间
- 流程分析-执行频率
- 绩效-流程绩效
- 产品服务-产品
- 产品服务-服务
- 流程执行-信息系统
- 风险控制 - 制度
- 风险控制 - 制度条款
- 风险控制- 风险
- 风险控制 - 控制
-->
<attribute key="number" title="编号" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="%,*" isValid="true"/>
<attribute key="desc" title="描述" type="textarea" value="" ref="" readonly="false" groupPath="baseAttribute" scope="%,*" isValid="true"/>
<attribute key="level" title="层次" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="%,*" isValid="true"/>
<attribute key="target_value" title="指标值" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="%,*" isValid="true"/>
</attributes>

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
引入图形设置非必须作用范围该MethodId对象。
被ResourceScanner扫描器检查更新
-->
<shapes>
<!--
methodId 建模方法IdmethodId、methodId.shapeId多个用逗号隔开
<import methodId="basic"/>
<import methodId="data.form"/>
<import methodId="org.normal"/> -->
</shapes>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Linker设置非必须多个app提供该Method Concept时追加定义作用范围该MethodId对象。
被ResourceScanner扫描器检查更新
-->
<linker>
<!--
Linker语境上下文设置
methodId 建模方法标识,这是一个隐形属性,读上级目录
conceptCode 代码methodId+conceptCode的组合不允许重复
fromShapeId 从哪些形状连出时多个ShapeId用逗号隔开,程序暂不支持逗号隔开
toShapeId 连接到哪些形状连出时多个ShapeId用逗号隔开
outcomingName 连出对象主动名称,用于提示给用户和生成文档
incomingName 连入对象被动名称,用于提示给用户和生成文档
-->
<!--<concept conceptCode="001" fromShapeId="risk" toShapeId="control" outcomingName="通过...得到降级" incomingName="减轻" />-->
</linker>

View File

@ -0,0 +1,5 @@
Schema.addCategory({name:"control_ma", text:"L1-L3流程绩效指标", dataAttributes:[]});
/*Risk 菱形*/
Schema.addShape({name:"ma", title:"L1-L3流程绩效指标",text:"L1-L3流程绩效指标", category:"control_ma", props:{w:110, h:50},lineStyle:{lineColor:"128,201,144"}, fillStyle:{type: "gradient",gradientType: "linear",beginColor: "242,255,245",endColor: "224,255,231",angle: Math.PI*0.5}, textBlock:{x:"10", y:"10", w:"w-20", h:"h-20"},textBlockFinal:{x:"w/2-60", y:"h", w:"120", h:"30"}, path:[
{actions:{ref:"rectangle"}}
]});

View File

@ -0,0 +1,3 @@
<!--
XXX片段模版被ResourceScanner扫描器检查更新
-->

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<attributes type="customer">
<attribute key="Number_of_the_associated_flow_file" title="关联流程文件编号" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="关联流程文件编号" isRequired="false"/>
<attribute key="Associated_process_name" title="关联流程名称" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="关联流程名称" isRequired="false"/>
<attribute key="Process_performance_indicator_Number" title="流程绩效指标编号" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="流程绩效指标编号" isRequired="false"/>
<attribute key="Name_process_performance_indicator" title="流程绩效指标名称" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="ndicator_User_defined_label" title="指标自定义标签" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="指标自定义标签" isRequired="false"/>
<attribute key="Data_fetch_logic" title="数据取数逻辑" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="数据取数逻辑" isRequired="false"/>
<attribute key="Take_the_number_aperture" title="取数口径" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="取数口径" isRequired="false"/>
<attribute key="unit_measurement" title="计量单位" type="select" value="" ref="天,%,金额" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="计量单位" isRequired="false"/>
<attribute key="statistical_period" title="统计周期" type="select" value="" ref="月度,季度,半年度,年度" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="统计周期" isRequired="false"/>
<attribute key="Platform_data_Display" title="平台数据展示" type="select" value="" ref="是,否" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="平台数据展示" isRequired="false"/>
<attribute key="computational_formula" title="计算公式" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="计算公式" isRequired="false"/>
<attribute key="The_upstream_indicators" title="上游指标" type="relation" value="" ref="{&quot;method&quot;:&quot;process&quot;,&quot;type&quot;:&quot;shape&quot;,&quot;multiple&quot;:false}" readonly="true" groupPath="baseAttribute" scope="*" isValid="true" desc="上游指标" isRequired="false"/>
<attribute key="Downstream_target" title="下游指标" type="relation" value="" ref="{&quot;method&quot;:&quot;process&quot;,&quot;type&quot;:&quot;shape&quot;,&quot;multiple&quot;:false}" readonly="true" groupPath="baseAttribute" scope="*" isValid="true" desc="下游指标" isRequired="false"/>
<attribute key="Index_definition" title="指标定义" type="textarea" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="指标定义" isRequired="false"/>
<attribute key="remark" title="备注" type="textarea" value="" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true" desc="备注" isRequired="false"/>
<attribute key="Process_Architecture_L1" title="L1" type="string" value="" desc="L1" isRequired="false" ref="" readonly="true" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="Process_Architecture_L2" title="L2" type="string" value="" desc="L2" isRequired="false" ref="" readonly="true" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="Process_Architecture_L3" title="L3" type="string" value="" desc="L3" isRequired="false" ref="" readonly="true" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="set_the_purpose" title="设置目的" type="string" value="" desc="设置目的" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="data_sources" title="数据来源" type="string" value="" desc="数据来源" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="explain" title="说明" type="string" value="" desc="说明" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="*" isValid="true"/>
<attribute key="number" title="编号" type="string" value="" desc="编号" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="%,*" isValid="true"/>
<attribute key="desc" title="描述" type="textarea" value="" desc="描述" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="%,*" isValid="true"/>
<attribute key="level" title="层次" type="string" value="" desc="层次" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="%,*" isValid="true"/>
<attribute key="target_value" title="指标值" type="string" value="" desc="指标值" isRequired="false" ref="" readonly="false" groupPath="baseAttribute" scope="%,*" isValid="true"/>
<attribute key="element" title="元素" type="table" value="" desc="元素" isRequired="false" ref="{&quot;firstColumn&quot;:&quot;元素&quot;,&quot;secondColumn&quot;:&quot;数据类型&quot;}" readonly="false" groupPath="baseAttribute" scope="%" isValid="true"/>
</attributes>

View File

@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
特性设置非必须多个app提供该Method Attribute时追加定义作用范围该MethodId对象。
被ResourceScanner扫描器检查更新
-->
<attributes>
<!--
分组
name 组名称
parentName 上级组名称,若根此处可空
desc 简要说明
<group name="AWS" parentName="" desc="AWS BPMS名称"/>
<group name="Process" parentName="AWS" desc="Process名称"/>-->
<group name="baseAttribute" parentName="" desc="基本属性"/>
<group name="targetCount" parentName="" desc="指标计算"/>
<!--
扩展特性(属性)
key 全局唯一标识名
title 属性标题
type 属性类型支持string(普通字符串),number(数字),boolean(是非),list(多选值),link(链接),relation(关联关系),textarea(多行文本)
value 默认值//支持@公式
ref 当type=list时参考值
readonly 是否只读
groupPath 特性绑定在哪个组别上
scope 应用范围methodId、methodId.shapeId多个用逗号隔开%代表文件属性 *代表对所有的图形有效,不是文件属性
- 组织-执行部门
- 流程分析-处理时间
- 流程分析-等待时间
- 流程分析-执行频率
- 绩效-流程绩效
- 产品服务-产品
- 产品服务-服务
- 流程执行-信息系统
- 风险控制 - 制度
- 风险控制 - 制度条款
- 风险控制- 风险
- 风险控制 - 控制
-->
<attribute key="number" title="编号" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="%,*" isValid="true"/>
<attribute key="desc" title="描述" type="textarea" value="" ref="" readonly="false" groupPath="baseAttribute" scope="%,*" isValid="true"/>
<attribute key="level" title="层次" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="%,*" isValid="true"/>
<attribute key="target_value" title="指标值" type="string" value="" ref="" readonly="false" groupPath="baseAttribute" scope="%,*" isValid="true"/>
</attributes>

View File

@ -2953,6 +2953,10 @@ public class CoEPALController {
}
/**
* 创建空白模板
* @param me

View File

@ -453,7 +453,7 @@ public final class PublishListHistory extends DaoObject<PublishListHistoryModel>
*/
public 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 sql="SELECT TASKID FROM BO_ACT_COE_PUBLISH_N WHERE PUBLISHFILEID = ? ORDER BY CREATEDATE DESC";
String taskId = DBSql.getObject(sql, new RowMapper<String>() {
@Override
public String mapRow(ResultSet rs, int arg1) throws SQLException {

View File

@ -2372,7 +2372,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 sql="SELECT TASKID FROM BO_ACT_COE_PUBLISH_N WHERE PUBLISHFILEID = ? ORDER BY CREATEDATE DESC";
String taskId = DBSql.getObject(sql, new RowMapper<String>() {
@Override
public String mapRow(ResultSet rs, int arg1) throws SQLException {

View File

@ -8161,8 +8161,20 @@ public class CoeProcessLevelWeb extends ActionWeb {
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
String plRid = UUIDGener.getUUID();
String id = UUIDGener.getUUID();
PALRepositoryModelImpl model = CoeProcessLevelUtil.createPALRepositoryModel(id, plRid, wsId, name, "", orderIndex, parentVersionId, category, true, 1,
id, false, method, "0", level, null, null, uid, uid, nowTime, null, null, null, null, null, null, null, null, null,securityLevel);
PALRepositoryModelImpl model;
//判断如果是MA,MP创建各自文件夹中
if(method.equals("control.kpi")){
String PerformanceparentId=checkAndCreatePalPerformanceFolderModel(coeProcessLevel,wsId);
model= CoeProcessLevelUtil.createPALRepositoryModel(id, plRid, wsId, name, "", orderIndex,PerformanceparentId, category, true, 1,
id, false, method, "0", level, null, null, uid, uid, nowTime, null, null, null, null, null, null, null, null, null,securityLevel);
}else if(method.equals("control.ma")){
String l1l3Performance=checkAndCreatePalL1L3PerformanceFolderModel(coeProcessLevel,wsId);
model= CoeProcessLevelUtil.createPALRepositoryModel(id, plRid, wsId, name, "", orderIndex, l1l3Performance, category, true, 1,
id, false, method, "0", level, null, null, uid, uid, nowTime, null, null, null, null, null, null, null, null, null,securityLevel);
}else{
model= CoeProcessLevelUtil.createPALRepositoryModel(id, plRid, wsId, name, "", orderIndex, parentVersionId, category, true, 1,
id, false, method, "0", level, null, null, uid, uid, nowTime, null, null, null, null, null, null, null, null, null,securityLevel);
}
// 创建
try {
coeProcessLevel.insert(model);
@ -8262,6 +8274,68 @@ public class CoeProcessLevelWeb extends ActionWeb {
}
/**
* 校验和创建末级流程绩效文件夹
* @param coeProcessLevel
* @param wsId
* @return 已经存在的或新创建的末级流程绩效ID
*/
public String checkAndCreatePalPerformanceFolderModel(PALRepository coeProcessLevel, String wsId) {
// 组织下创建[末级流程绩效]文件夹
List<PALRepositoryModel> defaultModels = PALRepositoryQueryAPIManager.getInstance().getPalRepositoryModelsByWsIdAndMethodId(wsId, "control");
defaultModels = defaultModels.stream()
.filter(model -> "default".equals(model.getMethodId()))
.filter(model -> "末级流程绩效".equals(model.getName())).collect(Collectors.toList());
if (defaultModels.size() == 0) {
String id = UUIDGener.getUUID();
int orderIndex = coeProcessLevel.getChildrenMaxOrderIndexByPidAndWsId("org", wsId) + 1;
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
PALRepositoryModelImpl defaultModel = CoeProcessLevelUtil.createPALRepositoryModel(id, UUIDGener.getUUID(), wsId, "末级流程绩效", "", orderIndex, "control", "control", true, 1,
id, false, "default", "0", 1, null, null, _uc.getUID(), _uc.getUID(), nowTime, null, null, null, null,
null, null, null, null, null, -1);
coeProcessLevel.insert(defaultModel);
defaultModels.add(defaultModel);
return defaultModel.getId();
} else {
return defaultModels.get(0).getId();
}
}
/**
* 校验和创建L1-L3流程绩效文件夹
* @param coeProcessLevel
* @param wsId
* @return 已经存在的或新创建的L1-L3流程绩效文件ID
*/
public String checkAndCreatePalL1L3PerformanceFolderModel(PALRepository coeProcessLevel, String wsId) {
// 组织下创建[L1-L3流程绩效]文件夹
List<PALRepositoryModel> defaultModels = PALRepositoryQueryAPIManager.getInstance().getPalRepositoryModelsByWsIdAndMethodId(wsId, "control");
defaultModels = defaultModels.stream()
.filter(model -> "default".equals(model.getMethodId()))
.filter(model -> "L1-L3流程绩效".equals(model.getName())).collect(Collectors.toList());
if (defaultModels.size() == 0) {
String id = UUIDGener.getUUID();
int orderIndex = coeProcessLevel.getChildrenMaxOrderIndexByPidAndWsId("org", wsId) + 1;
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
PALRepositoryModelImpl defaultModel = CoeProcessLevelUtil.createPALRepositoryModel(id, UUIDGener.getUUID(), wsId, "L1-L3流程绩效", "", orderIndex, "control", "control", true, 1,
id, false, "default", "0", 1, null, null, _uc.getUID(), _uc.getUID(), nowTime, null, null, null, null,
null, null, null, null, null, -1);
coeProcessLevel.insert(defaultModel);
defaultModels.add(defaultModel);
return defaultModel.getId();
} else {
return defaultModels.get(0).getId();
}
}
/**
* 获取路径
* @param parentId
@ -8459,39 +8533,41 @@ public class CoeProcessLevelWeb extends ActionWeb {
List data=new ArrayList();
data.add(0,methodId.trim());
data.add(1,uuid.trim());
PALRepositoryModelImpl model;
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
//判断如果methodID为角色图则创建到对应角色模型文件夹中
if(methodId.equals("org.role")){
RowMap rowMaprole=DBSql.getMap("SELECT ID FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME='角色模型' and PLCATEGORY='org'");
if(rowMaprole!=null){
parentId=rowMaprole.getString("ID");
}else{
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
String roleplRid = UUIDGener.getUUID();
String roleid = UUIDGener.getUUID();
//新建文件夹
PALRepositoryModelImpl modeldefault = CoeProcessLevelUtil.createPALRepositoryModel(roleid, roleplRid, wsId, "角色模型",
"", 1, "org", "org", true, 1,
roleid, false, "default", "0", 1, null,
null, "admin", "admin", nowTime, null, null,
null, null, null, null, null, null, null, 1);
coeProcessLevel.insert(modeldefault);
return modeldefault.getId();
}
model = CoeProcessLevelUtil.createPALRepositoryModel(id, plRid, wsId, plname + titleName,
"", 1, checkAndCreatePalRoleFolderModel(coeProcessLevel,wsId), category, true, 1,
id, false, methodId, "0", 1, null,
null, "admin", "admin", nowTime, null, data.toString(),
null, null, null, null, null, null, null, 1);
//如果control.kpi,创建末级流程绩效指标文件夹内
}else if(methodId.equals("control.kpi")){
model = CoeProcessLevelUtil.createPALRepositoryModel(id, plRid, wsId, plname + titleName,
"", 1, checkAndCreatePalPerformanceFolderModel(coeProcessLevel,wsId), category, true, 1,
id, false, methodId, "0", 1, null,
null, "admin", "admin", nowTime, null, data.toString(),
null, null, null, null, null, null, null, 1);
//如果是control.ma,创建L1-L3流程绩效文件夹内
}else if(methodId.equals("control.ma")){
model = CoeProcessLevelUtil.createPALRepositoryModel(id, plRid, wsId, plname + titleName,
"", 1, checkAndCreatePalL1L3PerformanceFolderModel(coeProcessLevel,wsId), category, true, 1,
id, false, methodId, "0", 1, null,
null, "admin", "admin", nowTime, null, data.toString(),
null, null, null, null, null, null, null, 1);
}else{
model = CoeProcessLevelUtil.createPALRepositoryModel(id, plRid, wsId, plname + titleName,
"", 1, parentId, category, true, 1,
id, false, methodId, "0", 1, null,
null, "admin", "admin", nowTime, null, data.toString(),
null, null, null, null, null, null, null, 1);
}
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
PALRepositoryModelImpl model = CoeProcessLevelUtil.createPALRepositoryModel(id, plRid, wsId, plname + titleName,
"", 1, parentId, category, true, 1,
id, false, methodId, "0", 1, null,
null, "admin", "admin", nowTime, null, data.toString(),
null, null, null, null, null, null, null, 1);
coeProcessLevel.insert(model);
BaseModel defineModel = CoeDesignerAPIManager.getInstance().getDefinition(model.getId(), 0);
if (defineModel == null) {
defineModel = CoeDesignerUtil.createModel(model.getId(), 0);

View File

@ -285,7 +285,8 @@ public class StartListener implements AppListener{
//新增org.role by zhaolei
MethodAppManager.register("org.role", appContext, "org.role", "角色图");
//新增control.kpiMA by zhaolei
MethodAppManager.register("control.ma", appContext, "control.ma", "L1-L3流程绩效指标");
// MethodAppManager.register("product.normal", appContext);
MethodAppManager.register("itsystem.normal", appContext, "itsystem.normal", "itsystem建模方法");
@ -430,12 +431,16 @@ public class StartListener implements AppListener{
handleCustomXml(methodPath + "process.flowchart/" + customXmlName);
//control.role 赵磊
//org.role 赵磊
handleCustomXml(methodPath + "org.role/" + customXmlName);
//control.kpiMA 赵磊
//handleCustomXml(methodPath + "control.kpiMA/" + customXmlName);
}
}
/**
* 处理自定义的属性文件