更新统一身份认证的相关代码增加认证时间和认证通过时间,将下载的操作由页面加载更改为点击按钮时调用
This commit is contained in:
parent
5457a09dad
commit
e5dda7ff31
@ -7,6 +7,7 @@ import com.actionsoft.bpms.server.UserContext;
|
||||
import com.actionsoft.bpms.server.bind.annotation.Controller;
|
||||
import com.actionsoft.bpms.server.bind.annotation.Mapping;
|
||||
import com.actionsoft.bpms.util.UUIDGener;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.awspaas.user.apps.integration.event.OutputDCFileProcessor;
|
||||
|
||||
/*
|
||||
@ -15,28 +16,38 @@ import com.awspaas.user.apps.integration.event.OutputDCFileProcessor;
|
||||
@Controller
|
||||
public class CreateFileContorller {
|
||||
@Mapping("com.awspaas.user.apps.integrates.createFileController")
|
||||
public String createFile(String sid,String taskId,String fileName) throws Exception {
|
||||
public JSONObject createFile(String sid,String taskId,String title) throws Exception {
|
||||
System.out.println("taskid》》》》》》》》》》"+taskId);
|
||||
System.out.println("fileName》》》》》》》》》》"+title);
|
||||
String reportDownloadURL = "";
|
||||
UserContext me = UserContext.fromSessionId(sid);
|
||||
OutputTaskModel model = new OutputTask().getTaskReportById(taskId);
|
||||
|
||||
if (model != null) {
|
||||
OutputTaskModel model = new OutputTask().getTaskReportById(taskId);
|
||||
JSONObject result = new JSONObject();
|
||||
if (model != null) {
|
||||
//三员管理,步骤横表下载重新生成手册
|
||||
String taskName = model.getTaskName();
|
||||
if ("步骤横表".equals(taskName)){
|
||||
// 重新设置生成id,与用户id
|
||||
String uuid = UUIDGener.getUUID();
|
||||
model.setUserId(me.getUID());
|
||||
|
||||
// 重新生成手册文件
|
||||
OutputAPIManager.getInstance().reGennerReport(me,model,uuid);
|
||||
|
||||
// 重新构建手册下载URL
|
||||
taskId = uuid;
|
||||
}
|
||||
|
||||
reportDownloadURL = OutputDCFileProcessor.getReportDownloadURL(model.getWsId(), taskId, model.getProfileId(), me, fileName + model.getTaskName());
|
||||
String taskName = model.getTaskName();
|
||||
if ("步骤横表".equals(taskName)){
|
||||
// 重新设置生成id,与用户id
|
||||
String uuid = UUIDGener.getUUID();
|
||||
model.setUserId(me.getUID());
|
||||
|
||||
// 重新生成手册文件
|
||||
OutputAPIManager.getInstance().reGennerReport(me,model,uuid);
|
||||
|
||||
// 重新构建手册下载URL
|
||||
taskId = uuid;
|
||||
}
|
||||
|
||||
try {
|
||||
result.put("result","ok");
|
||||
reportDownloadURL = OutputDCFileProcessor.getReportDownloadURL(model.getWsId(), taskId, model.getProfileId(), me, title+model.getTaskName());
|
||||
result.put("url",reportDownloadURL);
|
||||
} catch (Exception e) {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return reportDownloadURL;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ public class OauthLogin extends AbstractOauth {
|
||||
try {
|
||||
|
||||
long loginbegintime = System.currentTimeMillis();
|
||||
bo.set("BEGIN_TIME",loginbegintime);
|
||||
bo.set("LOGIN_BEGIN_TIME",loginbegintime);
|
||||
String redirect_uri = params.get("code");
|
||||
|
||||
if(StringUtils.isEmpty(redirect_uri)){
|
||||
|
||||
@ -221,7 +221,6 @@ public class TaskController {
|
||||
jsonObject.put("title",bo.get("PUBLISHFILENAME"));
|
||||
jsonObject.put("link",SDK.getPortalAPI().getPortalUrl()+ "/r/w?cmd=com.actionsoft.apps.coe.pal.publisher_publish_file_open&uuid=" + Row_maps_is_not_publish.getString("id") + "&sid=" + sid);
|
||||
jsonObject.put("size","");
|
||||
<<<<<<< HEAD
|
||||
jsonObject.put("id",num);
|
||||
jsonObject.put("taskId",id);
|
||||
// OutputTaskModel model = new OutputTask().getTaskReportById(id);
|
||||
@ -247,11 +246,9 @@ public class TaskController {
|
||||
*
|
||||
* e.printStackTrace(); } }
|
||||
*/
|
||||
=======
|
||||
jsonObject.put("id",id);
|
||||
jsonObject.put("id",num);
|
||||
System.out.println("查询完成后时间》》》》》》》"+System.currentTimeMillis());
|
||||
OutputTaskModel model = new OutputTask().getTaskReportById(id);
|
||||
JSONObject json = new JSONObject();
|
||||
/* OutputTaskModel model = new OutputTask().getTaskReportById(id);
|
||||
if (model != null) {
|
||||
//三员管理,步骤横表下载重新生成手册
|
||||
|
||||
@ -274,9 +271,8 @@ public class TaskController {
|
||||
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}*/
|
||||
System.out.println("构建表完成时间》》》》》》》"+System.currentTimeMillis());
|
||||
>>>>>>> 8f479d37933f5a19fec374d79fe5de2a45d5844c
|
||||
jsonArray.add(jsonObject);
|
||||
num++;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user