获取文件类型优化
This commit is contained in:
parent
1473e3787e
commit
daa67e14e3
@ -82,12 +82,20 @@ public class Report1Gener {
|
|||||||
// ----预处理、校验----
|
// ----预处理、校验----
|
||||||
OutputAppProfile appModel = OutputAppManager.getProfile(model.getProfileId());
|
OutputAppProfile appModel = OutputAppManager.getProfile(model.getProfileId());
|
||||||
String tempPath = appModel.getAppContext().getPath();
|
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());
|
PALRepositoryModel repositoryModel = PALRepositoryCache.getCache().get(jsonObj.get("targetFileId").toString());
|
||||||
String tempName;
|
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";
|
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";
|
tempName="工程企业标准模版-封面.xml";
|
||||||
}else{
|
}else{
|
||||||
tempName="制度-手册5.xml";
|
tempName="制度-手册5.xml";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user