流程改为流程制度,通过国际化文件更改

This commit is contained in:
446052889@qq.com 2022-07-12 13:48:11 +08:00
parent 8e495b7d0a
commit 5dc8201a19
3 changed files with 21 additions and 46 deletions

View File

@ -97,9 +97,9 @@
<big5><![CDATA[流程架构]]></big5>
</item>
<item key="process">
<cn><![CDATA[流程]]></cn>
<cn><![CDATA[流程制度]]></cn>
<en><![CDATA[Process]]></en>
<big5><![CDATA[流程]]></big5>
<big5><![CDATA[流程制度]]></big5>
</item>
<item key="org">
<cn><![CDATA[组织]]></cn>

View File

@ -5,6 +5,7 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Field;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
@ -229,14 +230,12 @@ public class PALRepositoryQueryAPIManager {
continue;
}
String className = obj.getClass().getName();
className = className.substring(className.lastIndexOf(".") + 1, className.length());
className = className.substring(className.lastIndexOf(".") + 1);
queryResult(map1, set, key, obj, className);
}
if (set.size() > 1) {
return false;
} else if (set.size() == 1 && set.contains(true))
return true;
return false;
} else return set.size() == 1 && set.contains(true);
}
private void queryResult(Map<String, Object> map1, Set<Boolean> set, String key, Object obj, String className) {
@ -474,7 +473,7 @@ public class PALRepositoryQueryAPIManager {
while (it.hasNext()) {
PALRepositoryModel model = it.next();
if (model.getWsId().equals(wsId) && model.isUse()) {
list.add((PALRepositoryModelImpl) model);
list.add(model);
}
}
return list;
@ -492,7 +491,7 @@ public class PALRepositoryQueryAPIManager {
while (it.hasNext()) {
PALRepositoryModel model = it.next();
if (model.getWsId().equals(wsId) && model.getMethodCategory().equals(category)) {
list.add((PALRepositoryModelImpl) model);
list.add(model);
}
}
return list;
@ -518,7 +517,7 @@ public class PALRepositoryQueryAPIManager {
flag = false;
}
if (flag) {
list.add((PALRepositoryModelImpl) model);
list.add(model);
}
}
}
@ -1187,7 +1186,7 @@ public class PALRepositoryQueryAPIManager {
isPublished = true;
}
StringBuilder removeIds = new StringBuilder("");
StringBuilder removeIds = new StringBuilder();
if (modelList.size() > 0) {
if (methods != null && !"".equals(methods)) {
List<PALRepositoryModel> removeList = new ArrayList<PALRepositoryModel>();
@ -1289,7 +1288,7 @@ public class PALRepositoryQueryAPIManager {
for (String str: palMethodList) {
for (PALRepositoryModel model : list1) {
if (model.getMethodCategory().equals(str)) {
list.add(new String(str));
list.add(str);
break;
}
}
@ -1307,9 +1306,6 @@ public class PALRepositoryQueryAPIManager {
jsonObject.put("currId", category);
jsonObject.put("versionId", category);
String name = I18nRes.findValue(CoEConstant.APP_ID, category);
if(name.equals("流程")){
name="流程制度";
}
jsonObject.put("name", name);
JSONObject icon = new JSONObject();
icon.put("icon", "");
@ -1847,10 +1843,8 @@ public class PALRepositoryQueryAPIManager {
if (list != null && list.size() > 0) {
Set<String> versionIds = new HashSet<String>();
for (PALRepositoryModel model : list) {
if (!versionIds.contains(model.getVersionId())) {
versionIds.add(model.getVersionId());
}
}
/*
* 如果流程的父节点也在列表中则只保留根节点
@ -2294,10 +2288,8 @@ public class PALRepositoryQueryAPIManager {
if (list != null && list.size() > 0) {
Set<String> versionIds = new HashSet<String>();
for (PALRepositoryModel model : list) {
if (!versionIds.contains(model.getVersionId())) {
versionIds.add(model.getVersionId());
}
}
for (PALRepositoryModel model : list) {
boolean flag = true;
String pid = model.getParentId();
@ -2343,7 +2335,7 @@ public class PALRepositoryQueryAPIManager {
String deptId = getDeptIdsInSql(_uc);
List<PALRepositoryModel> list = dao.getSpecityLevelByDeptId(deptId, wsId, methodId, category, isUsed, isPublish, level);
if (list != null && list.size() > 0) {
StringBuilder filePerms = new StringBuilder("");
StringBuilder filePerms = new StringBuilder();
for (PALRepositoryModel model : list) {
filePerms.append(model.getId()).append(",");
}
@ -2414,7 +2406,7 @@ public class PALRepositoryQueryAPIManager {
* @return 图片url
*/
public String getPalRepositoryModelPicture(UserContext _uc, String uuid) {
PALRepositoryModel cplm = (PALRepositoryModel) CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(uuid);
PALRepositoryModel cplm = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(uuid);
if (cplm == null) {
return null;
}
@ -3090,7 +3082,7 @@ public class PALRepositoryQueryAPIManager {
}
if (HighSecurity.isON()) {
String secAdmin = HighSecurity.getSecModel().getSysAdmin();
String arr[] = secAdmin.split(" ");
String[] arr = secAdmin.split(" ");
uid = arr[0];
}
String sid = new SSOUtil().registerClientSessionNoPassword(uid, "cn", "127.0.0.1", "pc");
@ -3137,11 +3129,7 @@ public class PALRepositoryQueryAPIManager {
UtilFile utilFile = new UtilFile(path + "/" + cplm.getId() + ".small.png");
if (utilFile.exists()) {
byte[] base64Bytes = Base64.encode(utilFile.readBytes());
try {
photo = "data:image/png;base64," + new String(base64Bytes, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
photo = "data:image/png;base64," + new String(base64Bytes, StandardCharsets.UTF_8);
}
}
} else {// 获取执行平台图片
@ -3171,11 +3159,7 @@ public class PALRepositoryQueryAPIManager {
UtilFile utilFile = new UtilFile(path + "/" + cplm.getId() + ".png");
if (utilFile.exists()) {
byte[] base64Bytes = Base64.encode(utilFile.readBytes());
try {
photo = "data:image/png;base64," + new String(base64Bytes, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
photo = "data:image/png;base64," + new String(base64Bytes, StandardCharsets.UTF_8);
}
}
} else {// 获取执行平台图片
@ -3453,9 +3437,7 @@ public class PALRepositoryQueryAPIManager {
return false;
}
if (!CoeProcessLevelUtil.isBpmProcessEdit()) {
if (model.isCorrelate()) {
return true;
}
return model.isCorrelate();
}
return false;
}
@ -3477,11 +3459,7 @@ public class PALRepositoryQueryAPIManager {
if (model == null) {
return true;
}
if (model.isCorrelate() && model.getCorrelateType() == 1 && "show".equals(model.getExt1())) {
return true;
} else {
return false;
}
return model.isCorrelate() && model.getCorrelateType() == 1 && "show".equals(model.getExt1());
}
private static class Inner {
@ -3864,7 +3842,7 @@ public class PALRepositoryQueryAPIManager {
List<UpfileModel> result = new ArrayList<>();
// 获取属性的关联类型(relationType)
Map<String, String> relationTypeMap = new HashMap<>();
PALRepositoryModel m = (PALRepositoryModel) CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(palId);
PALRepositoryModel m = CoeProcessLevelDaoFacotory.createCoeProcessLevel().getInstance(palId);
PALMethodModel palMethodModel = PALMethodCache.getPALMethodModelById(m.getMethodId());
if (palMethodModel != null) {
List<PALMethodAttributeModel> attributes = palMethodModel.getAttributes();
@ -4131,10 +4109,7 @@ public class PALRepositoryQueryAPIManager {
public boolean checkFileSecurity(PALRepositoryModel model){
PALMethodModel methodModel = PALMethodCache.getPALMethodModelById(model.getMethodId());
if (null != methodModel && !methodModel.isFolder() && model.getSecurityLevel() == -1){
return true;
}
return false;
return null != methodModel && !methodModel.isFolder() && model.getSecurityLevel() == -1;
}
/**