获取文件类型优化

This commit is contained in:
yujh 2024-11-06 10:17:08 +08:00
parent 1473e3787e
commit daa67e14e3

View File

@ -82,12 +82,20 @@ public class Report1Gener {
// ----预处理校验----
OutputAppProfile appModel = OutputAppManager.getProfile(model.getProfileId());
String tempPath = appModel.getAppContext().getPath();
//增加判断文件类型逻辑因为可能有多个取其中第一个文件判断文件类型
String targetFileId = "";
String[] targetFileIds = jsonObj.getString("targetFileId").split(",");
for (String fileId : targetFileIds) {
if(UtilString.isNotEmpty(fileId)){
targetFileId = fileId;
break;
}
}
PALRepositoryModel repositoryModel = PALRepositoryCache.getCache().get(jsonObj.get("targetFileId").toString());
String tempName;
if(PALRepositoryCache.getCache().get(jsonObj.get("targetFileId").toString()).getMethodId().equals("process.scheme")){
if(PALRepositoryCache.getCache().get(targetFileId).getMethodId().equals("process.scheme")){
tempName = "方案-手册1.xml";
}else if(PALRepositoryCache.getCache().get(jsonObj.get("targetFileId").toString()).getMethodId().equals("engineering.standard")){
}else if(PALRepositoryCache.getCache().get(targetFileId).getMethodId().equals("engineering.standard")){
tempName="工程企业标准模版-封面.xml";
}else{
tempName="制度-手册5.xml";