流程手册报告生成器优化
This commit is contained in:
parent
ef4be3f26f
commit
41882bd841
@ -59,6 +59,40 @@ public class OutputDCFileProcessor extends AbstFileProcessor implements FileProc
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到报告文件
|
||||
*
|
||||
* @param wsId 资产库id
|
||||
* @param id 任务Id
|
||||
* @param profileId 报告生成器扩展App的配置Id
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String getReportUtilDownloadURL(String wsId, String id, String profileId, UserContext _uc, String taskName) throws Exception {
|
||||
UtilFile file = OutputAPIManager.getInstance().getFilePath(wsId, id, profileId);
|
||||
OutputWordUtil.xml2Word(null, file.getPath());
|
||||
if (file.exists()) {
|
||||
//String josnStr = OutputAPIManager.getInstance().getWizardJsonData(wsId, id, profileId);
|
||||
// JSONObject jsonObj = JSONObject.fromObject(josnStr);
|
||||
DCContext dcContext = null;
|
||||
DCUtil.getInstance();
|
||||
dcContext = DCUtil.createTempFileContext("com.actionsoft.apps.coe.pal.output.pr", "output", id, "zip");
|
||||
dcContext.setFileName(taskName+ ".zip");
|
||||
File ff = new File(dcContext.getFilePath());
|
||||
// UtilFile.zipCompress(file.getPath(), ff, "doc");
|
||||
// UtilFile.zipCompressExcludeName(file.getPath(), ff, "txt,**/*.log");
|
||||
UtilFile.zipCompressExcludeName(file.getPath(), ff, "txt,**/*.log,**/*.xml,xmltodoc/");
|
||||
dcContext.setSession(_uc);
|
||||
// 操作行为日志记录
|
||||
if (SDK.getAppAPI().getPropertyBooleanValue(CoEConstant.APP_ID, "IS_RECORD_OP_LOG", false)) {
|
||||
CoEOpLogAPI.auditOkOp(_uc, CoEOpLogConst.MODULE_CATEGORY_APPCENTER, CoEOpLogConst.OP_DOWNLOAD, CoEOpLogConst.INFO_OUTPUT_DOWNLOAD);
|
||||
}
|
||||
return dcContext.getDownloadURL();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* 预览报告文件
|
||||
* @param wsId 资产库id
|
||||
|
||||
Loading…
Reference in New Issue
Block a user