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