制度手册相关/支持文件搜索优化

This commit is contained in:
zhaol 2024-11-05 17:40:26 +08:00
parent ccae909979
commit 463766de7c
3 changed files with 21 additions and 16 deletions

View File

@ -1144,14 +1144,14 @@ public class OutputWordUtil {
for(PALRepositoryModel oneModel:models){ for(PALRepositoryModel oneModel:models){
if(oneModel.isUse()==true){ if(oneModel.isUse()==true){
name=oneModel.getName(); name=oneModel.getName();
}
}
}
JSONObject tmp = new JSONObject(); JSONObject tmp = new JSONObject();
tmp.put("name", name); tmp.put("name", name);
tmp.put("desc", index); tmp.put("desc", index);
related_support_files.add(tmp); related_support_files.add(tmp);
} }
}
}
}
CharacterFormat format2 = new CharacterFormat(); CharacterFormat format2 = new CharacterFormat();
@ -1364,7 +1364,7 @@ public class OutputWordUtil {
} }
try { try {
System.out.println("生成附件路径是=================="+outFile.getPath()); System.out.println("Filed=================="+repositoryModel.getId());
doc.saveToFile(outFile.getPath(), FileFormat.Docx_2013); doc.saveToFile(outFile.getPath(), FileFormat.Docx_2013);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();

View File

@ -127,6 +127,7 @@ public class RepositoryTreeUtil {
for(int i=0;i<relatedRowMap.size();i++){ for(int i=0;i<relatedRowMap.size();i++){
JSONObject jb = new JSONObject(); JSONObject jb = new JSONObject();
PALRepositoryModel pModel=PALRepositoryCache.getCache().get(relatedRowMap.get(i).getString("RELATIONFILEID")); PALRepositoryModel pModel=PALRepositoryCache.getCache().get(relatedRowMap.get(i).getString("RELATIONFILEID"));
if(pModel!=null){
String sessionId = new SSOUtil().registerClientSessionNoPassword("admin", LoginConst.DEFAULT_LANG, "localhost", LoginConst.DEVICE_PC); String sessionId = new SSOUtil().registerClientSessionNoPassword("admin", LoginConst.DEFAULT_LANG, "localhost", LoginConst.DEVICE_PC);
String url=SDK.getConfAPI().getPortalUrl() + "/r/w?uuid="+ pModel.getId()+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+sessionId; String url=SDK.getConfAPI().getPortalUrl() + "/r/w?uuid="+ pModel.getId()+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+sessionId;
jb.put("relatedName",pModel.getName()); jb.put("relatedName",pModel.getName());
@ -136,6 +137,8 @@ public class RepositoryTreeUtil {
} }
}
palObject.put("relatedData", jsonArray1); palObject.put("relatedData", jsonArray1);
@ -284,13 +287,13 @@ public class RepositoryTreeUtil {
//相关/支持文件 //相关/支持文件
JSONArray jsonArray1=new JSONArray(); JSONArray jsonArray1=new JSONArray();
String relatedName="";
List<RowMap> relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+palModel.getId()+"' and ATTRID='related_support_files'"); List<RowMap> relatedRowMap=DBSql.getMaps("SELECT RELATIONFILEID FROM APP_ACT_COE_PAL_SHAPE_RLAT where FILEID='"+palModel.getId()+"' and ATTRID='related_support_files'");
Map map=new HashMap(); Map map=new HashMap();
if(relatedRowMap.size()>0){ if(relatedRowMap.size()>0){
for(int i=0;i<relatedRowMap.size();i++){ for(int i=0;i<relatedRowMap.size();i++){
JSONObject jb = new JSONObject(); JSONObject jb = new JSONObject();
PALRepositoryModel pModel=PALRepositoryCache.getCache().get(relatedRowMap.get(i).getString("RELATIONFILEID")); PALRepositoryModel pModel=PALRepositoryCache.getCache().get(relatedRowMap.get(i).getString("RELATIONFILEID"));
if(pModel!=null){
String sessionId = new SSOUtil().registerClientSessionNoPassword("admin", LoginConst.DEFAULT_LANG, "localhost", LoginConst.DEVICE_PC); String sessionId = new SSOUtil().registerClientSessionNoPassword("admin", LoginConst.DEFAULT_LANG, "localhost", LoginConst.DEVICE_PC);
String url=SDK.getConfAPI().getPortalUrl() + "/r/w?uuid="+ pModel.getId()+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+sessionId; String url=SDK.getConfAPI().getPortalUrl() + "/r/w?uuid="+ pModel.getId()+"&teamId=&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&sid="+sessionId;
jb.put("relatedName",pModel.getName()); jb.put("relatedName",pModel.getName());
@ -300,6 +303,8 @@ public class RepositoryTreeUtil {
} }
}
palObject.put("relatedData", jsonArray1); palObject.put("relatedData", jsonArray1);
if (!UtilString.isEmpty(palModel.getDutyUser())) { if (!UtilString.isEmpty(palModel.getDutyUser())) {