流程,报告生成器代码补充
This commit is contained in:
parent
d9925d41d2
commit
a76e4f17f5
@ -82,6 +82,53 @@ public class ReportPrController {
|
||||
return ro.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* 报告下载
|
||||
*
|
||||
* @param me
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Mapping("com.actionsoft.apps.coe.pal.output.pr_downloadreportutils")
|
||||
public String downloadreportutils(UserContext me, String id) {
|
||||
OutputTaskModel model = new OutputTask().getTaskReportById(id);
|
||||
ResponseObject ro = null;
|
||||
JSONObject json = new JSONObject();
|
||||
if (model != null) {
|
||||
//三员管理,步骤横表下载重新生成手册
|
||||
if (HighSecurityUtil.isON()){
|
||||
//流程文件密级switch开启,密级权限校验
|
||||
if (HighSecurityUtil.fileSecuritySwitch()){
|
||||
ResponseObject securityPermission = PALRepositoryQueryAPIManager.getInstance().checkOutputSecurityPermission(me, model);
|
||||
if (securityPermission.isErr()){
|
||||
return securityPermission.toString();
|
||||
}
|
||||
}
|
||||
String taskName = model.getTaskName();
|
||||
if ("步骤横表".equals(taskName)){
|
||||
// 重新设置生成id,与用户id
|
||||
String uuid = UUIDGener.getUUID();
|
||||
model.setUserId(me.getUID());
|
||||
|
||||
// 重新生成手册文件
|
||||
OutputAPIManager.getInstance().reGennerReport(me,model,uuid);
|
||||
|
||||
// 重新构建手册下载URL
|
||||
id = uuid;
|
||||
}
|
||||
}
|
||||
try {
|
||||
ro = ResponseObject.newOkResponse();
|
||||
json.put("url", OutputDCFileProcessor.getReportUtilDownloadURL(model.getWsId(), id, model.getProfileId(), me, model.getTaskName()));
|
||||
ro.setData(json);
|
||||
} catch (Exception e) {
|
||||
ro = ResponseObject.newErrResponse();
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return ro.toString();
|
||||
}
|
||||
|
||||
/*
|
||||
* 预览报告
|
||||
* @param me
|
||||
|
||||
Loading…
Reference in New Issue
Block a user