架构图增加属性,过滤末级绩效/MP架构过滤L1L3/L1L3图形名称修改/PAL打包

This commit is contained in:
zhal 2022-08-31 14:24:21 +08:00
parent 016a9cc0dc
commit 5457a09dad
7 changed files with 131 additions and 34 deletions

View File

@ -1,5 +1,5 @@
Schema.addCategory({name:"control_kpi", text:"流程KPI图", dataAttributes:[]});
Schema.addCategory({name:"control_kpi", text:"末级流程绩效", dataAttributes:[]});
/*Risk 菱形*/
Schema.addShape({name:"kpi", title:"流程KPI",text:"流程KPI", category:"control_kpi", 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:[
Schema.addShape({name:"kpi", title:"末级流程绩效指标",text:"末级流程绩效指标", category:"control_kpi", 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

@ -4,4 +4,5 @@
<attribute key="Process_performance_metrics" title="流程绩效" type="relation" value="" desc="流程绩效" isRequired="false" ref="{&quot;method&quot;:&quot;control.kpi&quot;,&quot;type&quot;:&quot;shape&quot;,&quot;multiple&quot;:true}" readonly="true" groupPath="process_model" scope="%,*" isValid="true"/>
<attribute key="definition" title="定义" type="string" value="" desc="定义" isRequired="false" ref="" readonly="false" groupPath="process_model" scope="%,*" isValid="true"/>
<attribute key="number" title="编号" type="string" value="" desc="编号" isRequired="false" ref="" readonly="false" groupPath="process_model" scope="%,*" isValid="true"/>
<attribute key="L1L3_Performance" title="相关L1-L3流程绩效指标" type="relation" value="" desc="相关L1-L3流程绩效指标" isRequired="false" ref="{&quot;method&quot;:&quot;control.ma&quot;,&quot;type&quot;:&quot;shape&quot;,&quot;multiple&quot;:false}" readonly="true" groupPath="baseAttribute" scope="*" isValid="true"/>
</attributes>

View File

@ -2002,7 +2002,98 @@ public class PALRepositoryQueryAPIManager {
data.add(1,uuid);
RowMap rowMap = DBSql.getMap("SELECT EXT2 FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID=? AND EXT2=?",model.getId(),data.toString());
if (rowMap != null || model.getName().equals("L1-L3流程绩效") || model.getName().equals("末级流程绩效")) {
if (rowMap != null ||model.getName().equals("末级流程绩效")) {
JSONObject object = new JSONObject();
object.put("id", model.getId().trim());
object.put("pid", model.getNewParentId().trim());
if (removeIds != null && removeIds.contains(model.getId().trim())) {
object.put("nocheck", true);
} else {
object.put("nocheck", false);
}
object.put("plNo", CoeProcessLevelUtil.getProcessLevelNoByUUId(model.getId(), model.getWsId()).trim());
object.put("name", I18nRes.findValue(CoEConstant.APP_ID, context.getLanguage(), model.getName()).trim());
object.put("wsId", model.getWsId());
PALMethodModel methodModel = PALMethodCache.getPALMethodModelById(model.getMethodId());
if (methodModel == null || methodModel.isFolder()) {// 没有该建模方法或者是文件夹类
object.put("title", object.get("name"));
} else {
object.put("title", object.get("name") + " " + VersionUtil.getVersionStrV(model.getVersion()).trim());
}
//三员管理文件密级校验
if (HighSecurityUtil.isON() && HighSecurityUtil.fileSecuritySwitch()){
ResponseObject responseObject = new CoeProcessLevelWeb(DispatcherRequest.getUserContext()).checkFilePemission(model.getId());
if (responseObject.isErr() && (methodModel != null && !methodModel.isFolder())){
object.put("nocheck", true);
}
}
object.put("drop", false);
object.put("isSystemFile", model.isSystemFile());
object.put("plMethodId", model.getMethodId().trim());
if (methodModel == null || methodModel.isFolder()) {// 没有该建模方法或者是文件夹类
object.put("iconFont", "&#58930;");
} else {
object.put("iconFont", "&#59101;");
}
List<PALRepositoryModel> children = null;
if (isUsed) {
children = getUsedPalRepositoryModelsByPid(model.getWsId(), model.getId());
if (param != null && "designer".equals(param) && children != null && children.size() > 0) {// 过滤掉发布版本
List<PALRepositoryModel> tempChildren = new ArrayList<>();
for (PALRepositoryModel model2 : children) {
if (!model2.isPublish()) {
tempChildren.add(model2);
}
}
children = tempChildren;
}
} else if (isPublished) {
children = getPublishedPalRepositoryModelsByPid(model.getWsId(), model.getId());
}
if (children == null || children.size() == 0) {
object.put("isParent", false);
//String icon = object.getString("icon");
object.put("leaf", true);// 叶子节点
// object.put("icon", icon.replace("16.png", "16.leaf.png"));
} else {
object.put("isParent", true);
object.put("open", false);
}
object.put("plLevel", model.getLevel());
object.put("plOrdexIndex", model.getOrderIndex());
object.put("plDiagramUrl", model.getDiagramUrl());
object.put("isDrops", model.isSystemFile());
object.put("isPublish", model.isPublish());
object.put("isStop", model.isStop());
object.put("isApproval", model.isApproval());
object.put("ext1", model.getExt1());
object.put("ext2", model.getExt2());
object.put("ext3", model.getExt3());
object.put("ext4", model.getExt4());
object.put("isUse", model.isUse());
object.put("url", "./w?sid=" + context.getSessionId() + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_portal_page&ruuid=" + model.getId() + "&type=1&wsid=" + model.getWsId());
object.put("plCategory", model.getMethodCategory());
object.put("versionId", model.getVersionId());
object.put("orderIndex", model.getOrderIndex());
object.put("isBottomLevel", model.isBottomLevel());
String dutyDeptId = model.getDutyDept();
object.put("dutyDeptId", dutyDeptId == null ? "" : dutyDeptId);
String plDutyDeptName = dutyDeptId;
if (!UtilString.isEmpty(dutyDeptId)) {
if (SDK.getORGAPI().getDepartmentById(dutyDeptId) != null) {
plDutyDeptName = SDK.getORGAPI().getDepartmentById(dutyDeptId).getName();
}
}
object.put("dutyDeptName", UtilString.isEmpty(dutyDeptId) ? "" : plDutyDeptName);
String plDutyPerson = model.getDutyUser();
object.put("dutyPersonId", model.getDutyUser() == null ? "" : model.getDutyUser());
object.put("dutyPersionName", UtilString.isEmpty(plDutyPerson) ? "" : SDK.getORGAPI().getUserAliasNames(plDutyPerson));
jsonArray.add(object);
}
}else if(attrId.equals("L1L3_Performance")){
if (model.getName().equals("L1-L3流程绩效") || model.getMethodId().equals("control.ma")) {
JSONObject object = new JSONObject();
object.put("id", model.getId().trim());
object.put("pid", model.getNewParentId().trim());

View File

@ -767,26 +767,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
JSONArray jsonArr_new = new JSONArray();
JSONArray objects = JSONArray.parseArray(treeJson);
//角色图属性代码是role/绩效图属性代码为Process_performance_metrics进行判断
/*if (attrId.equals("Process_performance_metrics")) {
*//*if (objects != null) {
for (int i = 0; i < objects.size(); i++) {
JSONObject jsonObject = objects.getJSONObject(i);
String url = jsonObject.getString("url");
String id = jsonObject.getString("id");
if (UtilString.isNotEmpty(url)) {
List data = new ArrayList();
data.add(0, jsonObject.getString("plMethodId"));
data.add(1, ruuid);
RowMap rowMap = DBSql.getMap("SELECT EXT2 FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID=? AND EXT2=?", id, data.toString());
if (rowMap != null) {
jsonArr_new.add(objects.getJSONObject(i));
}
} else {
jsonArr_new.add(objects.getJSONObject(i));
}
}
}*//*
if (attrId.equals("Process_performance_metrics")) {
if (objects != null) {
for (int i = 0; i < objects.size(); i++) {
JSONObject jsonObject = objects.getJSONObject(i);
@ -795,17 +776,17 @@ public class DesignerRelationShapeWeb extends ActionWeb {
if (isParent != null) {
if (isParent.equals("true")) {
String title=jsonObject.getString("title");
if(title.equals("末级流程绩效") || title.equals("L1-L3流程绩效") ){
String title = jsonObject.getString("title");
if (title.equals("末级流程绩效")) {
jsonArr_new.add(objects.getJSONObject(i));
}else{
} else {
List<PALRepositoryModel> coeProcessLevelModels = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getCoeProcessLevelByPid(id, wsId);
if (coeProcessLevelModels.size() > 0) {
for (int k = 0; k < coeProcessLevelModels.size(); k++) {
PALRepositoryModel coeProcessLevelModel = coeProcessLevelModels.get(k);
if (coeProcessLevelModel != null) {
List data = new ArrayList();
data.add(0, jsonObject.getString("plMethodId"));
data.add(0, "control.kpi");
data.add(1, ruuid);
RowMap rowMap = DBSql.getMap("SELECT EXT2 FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID=? AND EXT2=?", coeProcessLevelModel.getId(), data.toString());
if (rowMap != null) {
@ -819,7 +800,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
} else {
List data = new ArrayList();
data.add(0, jsonObject.getString("plMethodId"));
data.add(0, "control.kpi");
data.add(1, ruuid);
RowMap rowMap = DBSql.getMap("SELECT EXT2 FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID=? AND EXT2=?", id, data.toString());
if (rowMap != null) {
@ -833,7 +814,28 @@ public class DesignerRelationShapeWeb extends ActionWeb {
}
}
macroLibraries.put("treeData", jsonArr_new.toString());
} else*/ if (attrId.equals("role")) {
}else if(attrId.equals("L1L3_Performance")){
if (objects != null) {
for (int i = 0; i < objects.size(); i++) {
JSONObject jsonObject = objects.getJSONObject(i);
String id = jsonObject.getString("id");
String isParent = jsonObject.getString("isParent");
if (isParent != null) {
if (isParent.equals("true")) {
String title = jsonObject.getString("title");
if (title.equals("L1-L3流程绩效")) {
jsonArr_new.add(objects.getJSONObject(i));
}
}
} else {
jsonArr_new.add(objects.getJSONObject(i));
}
}
}
macroLibraries.put("treeData", jsonArr_new.toString());
} else if (attrId.equals("role")) {
if (objects != null) {
for (int i = 0; i < objects.size(); i++) {
JSONObject jsonObject = objects.getJSONObject(i);
@ -1292,7 +1294,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
*/
public String getTreeJson(String wsId, String pid,String attrId,String uuid) {
JSONArray list;
if(attrId.equals("Process_performance_metrics") || attrId.equals("role") || attrId.equals("R_relevant_flies")){
if(attrId.equals("Process_performance_metrics") || attrId.equals("role") || attrId.equals("R_relevant_flies") || attrId.equals("L1L3_Performance")){
list= PALRepositoryQueryAPIManager.getInstance().getUsedPalRepositoryTreeDataByPidAnduuid(_uc, wsId,pid,attrId,uuid);
}else{
list= PALRepositoryQueryAPIManager.getInstance().getUsedPalRepositoryTreeDataByPid(_uc, wsId, pid);

View File

@ -2314,7 +2314,10 @@ public class CoeProcessLevelUtil {
sb.append(appUrl).append(",");
}
attribute.put("value", sb.substring(0, sb.length()-1));
if(sb.length()>0){
attribute.put("value", sb.substring(0, sb.length()-1));
}
}else{

View File

@ -8289,7 +8289,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
if (defaultModels.size() == 0) {
String id = UUIDGener.getUUID();
int orderIndex = coeProcessLevel.getChildrenMaxOrderIndexByPidAndWsId("org", wsId) + 1;
int orderIndex = coeProcessLevel.getChildrenMaxOrderIndexByPidAndWsId("control", 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,
@ -8319,7 +8319,7 @@ public class CoeProcessLevelWeb extends ActionWeb {
if (defaultModels.size() == 0) {
String id = UUIDGener.getUUID();
int orderIndex = coeProcessLevel.getChildrenMaxOrderIndexByPidAndWsId("org", wsId) + 1;
int orderIndex = coeProcessLevel.getChildrenMaxOrderIndexByPidAndWsId("control", 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,