diff --git a/com.actionsoft.apps.coe.pal/i18n/resource.xml b/com.actionsoft.apps.coe.pal/i18n/resource.xml
index b48f5886..e78b7aba 100755
--- a/com.actionsoft.apps.coe.pal/i18n/resource.xml
+++ b/com.actionsoft.apps.coe.pal/i18n/resource.xml
@@ -47,10 +47,15 @@
-
-
+
-
+
+ -
+
+
+
+
-
diff --git a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar
index 94f41527..f0e54584 100644
Binary files a/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar and b/com.actionsoft.apps.coe.pal/lib/com.actionsoft.apps.coe.pal.jar differ
diff --git a/com.actionsoft.apps.coe.pal/method/control.ma/diagram.attribute.custom.xml b/com.actionsoft.apps.coe.pal/method/control.ma/diagram.attribute.custom.xml
new file mode 100644
index 00000000..ee128084
--- /dev/null
+++ b/com.actionsoft.apps.coe.pal/method/control.ma/diagram.attribute.custom.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/com.actionsoft.apps.coe.pal/method/control.ma/diagram.attribute.xml b/com.actionsoft.apps.coe.pal/method/control.ma/diagram.attribute.xml
new file mode 100644
index 00000000..834f0cc6
--- /dev/null
+++ b/com.actionsoft.apps.coe.pal/method/control.ma/diagram.attribute.xml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/com.actionsoft.apps.coe.pal/method/control.ma/diagram.import.xml b/com.actionsoft.apps.coe.pal/method/control.ma/diagram.import.xml
new file mode 100644
index 00000000..25b579cb
--- /dev/null
+++ b/com.actionsoft.apps.coe.pal/method/control.ma/diagram.import.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/com.actionsoft.apps.coe.pal/method/control.ma/diagram.linker.xml b/com.actionsoft.apps.coe.pal/method/control.ma/diagram.linker.xml
new file mode 100644
index 00000000..69ab9b1c
--- /dev/null
+++ b/com.actionsoft.apps.coe.pal/method/control.ma/diagram.linker.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/com.actionsoft.apps.coe.pal/method/control.ma/diagram.schema.tpl b/com.actionsoft.apps.coe.pal/method/control.ma/diagram.schema.tpl
new file mode 100644
index 00000000..c93dfbde
--- /dev/null
+++ b/com.actionsoft.apps.coe.pal/method/control.ma/diagram.schema.tpl
@@ -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"}}
+]});
diff --git a/com.actionsoft.apps.coe.pal/method/control.ma/fragment/abc.tpl b/com.actionsoft.apps.coe.pal/method/control.ma/fragment/abc.tpl
new file mode 100644
index 00000000..f13845d4
--- /dev/null
+++ b/com.actionsoft.apps.coe.pal/method/control.ma/fragment/abc.tpl
@@ -0,0 +1,3 @@
+
diff --git a/com.actionsoft.apps.coe.pal/method/control.ma/fragment/diagram.attribute.custom.xml b/com.actionsoft.apps.coe.pal/method/control.ma/fragment/diagram.attribute.custom.xml
new file mode 100644
index 00000000..0521b2ed
--- /dev/null
+++ b/com.actionsoft.apps.coe.pal/method/control.ma/fragment/diagram.attribute.custom.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/com.actionsoft.apps.coe.pal/method/control.ma/fragment/diagram.attribute.xml b/com.actionsoft.apps.coe.pal/method/control.ma/fragment/diagram.attribute.xml
new file mode 100644
index 00000000..834f0cc6
--- /dev/null
+++ b/com.actionsoft.apps.coe.pal/method/control.ma/fragment/diagram.attribute.xml
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java
index 9ef60765..28108020 100755
--- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java
+++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java
@@ -2953,6 +2953,10 @@ public class CoEPALController {
}
+
+
+
+
/**
* 创建空白模板
* @param me
diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/manage/publish/dao/PublishListHistory.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/manage/publish/dao/PublishListHistory.java
index 26beec57..3973ab01 100755
--- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/manage/publish/dao/PublishListHistory.java
+++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/manage/publish/dao/PublishListHistory.java
@@ -453,7 +453,7 @@ public final class PublishListHistory extends DaoObject
*/
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() {
@Override
public String mapRow(ResultSet rs, int arg1) throws SQLException {
diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/CoeProcessLevelUtil.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/CoeProcessLevelUtil.java
index 86170b8d..076dc50f 100755
--- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/CoeProcessLevelUtil.java
+++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/util/CoeProcessLevelUtil.java
@@ -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() {
@Override
public String mapRow(ResultSet rs, int arg1) throws SQLException {
diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java
index 0d795344..b019561e 100755
--- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java
+++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java
@@ -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 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 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);
diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/plugin/StartListener.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/plugin/StartListener.java
index 6910380b..11c9ccee 100755
--- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/plugin/StartListener.java
+++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/plugin/StartListener.java
@@ -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);
- }
+
+
+ }
/**
* 处理自定义的属性文件