获取taskid调整/打包文件调整

This commit is contained in:
zhal 2022-08-26 18:06:35 +08:00
parent 139b4618bc
commit 2426c25957
6 changed files with 20 additions and 7 deletions

View File

@ -1187,12 +1187,12 @@ public class CoEPALController {
* @return
*/
@Mapping("com.actionsoft.apps.coe.pal_outputreport_output_downloadZipfile")
public String COEPALOUTPUTREPORTOutputProcessDownloadZipFILE(UserContext me, RequestParams params) throws Exception {
public String COEPALOUTPUTREPORTOutputProcessDownloadZipFILE(UserContext me, RequestParams params,String methodId) throws Exception {
UpfileWeb web = new UpfileWeb(me);
String splitId = params.get("splitId");
String toolbarname=params.get("toolbarname");
String taskId=params.get("taskIdParams");
return web.readZipFileDownLoad(splitId,toolbarname,taskId);
return web.readZipFileDownLoad(splitId,toolbarname,taskId,methodId);
}

View File

@ -452,14 +452,17 @@ public final class PublishListHistory extends DaoObject<PublishListHistoryModel>
* @return
*/
public String getLastPublishTaskIdByModelId(String repositoryId) {
System.out.println("repositoryId==============="+repositoryId);
//String sql = "SELECT pl.TASKID FROM APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl WHERE pl.pid = p.id AND pl.palrepositoryid = ? ORDER BY publishdate DESC";
String sql="SELECT * FROM (SELECT TASKID FROM BO_ACT_COE_PUBLISH_N WHERE PUBLISHFILEID=? ORDER BY CREATEDATE DESC) WHERE ROWNUM=1";
String sql="SELECT TASKID FROM (SELECT TASKID FROM BO_ACT_COE_PUBLISH_N WHERE PUBLISHFILEID=? ORDER BY CREATEDATE DESC) WHERE ROWNUM=1";
String taskId = DBSql.getObject(sql, new RowMapper<String>() {
@Override
public String mapRow(ResultSet rs, int arg1) throws SQLException {
return rs.getString(1);
}
}, new Object[] { repositoryId });
System.out.println("taskID====================="+taskId);
return taskId;
}

View File

@ -488,7 +488,7 @@ public class UpfileWeb extends ActionWeb {
* @return
* @author zhaolei
*/
public String readZipFileDownLoad(String splitId,String toolbarname,String taskId) throws Exception {
public String readZipFileDownLoad(String splitId,String toolbarname,String taskId,String methodId) throws Exception {
UserContext me = super.getContext();
ResponseObject ro = ResponseObject.newOkResponse();
UpFileDao upfileDao = new UpFileDao();
@ -534,6 +534,8 @@ public class UpfileWeb extends ActionWeb {
}
//流程手册打包
if (UtilString.isNotEmpty(taskId)) {
OutputTaskModel model = new OutputTask().getTaskReportById(taskId);
@ -553,7 +555,14 @@ public class UpfileWeb extends ActionWeb {
if (docFile == null) {
return ResponseObject.newErrResponse("没有找到文件").toString();
}
String sourceAppId = "com.awspaas.user.apps.coe.pal.output.bd";
String sourceAppId = null;
if (methodId.equals("data.form")) {
sourceAppId = "com.awspaas.user.apps.coe.pal.output.bd";
}
if (methodId.indexOf("process.") > -1) {
sourceAppId="com.actionsoft.apps.coe.pal.output.pr";
}
String filename = docFile.getName();
DCContext sourceDc = new DCContext(_uc, DCProfileManager.getDCProfile(sourceAppId, "output"), sourceAppId, model.getWsId(), taskId, filename);

View File

@ -2372,7 +2372,7 @@ public class CoeProcessLevelUtil {
*/
public static String getLastPublishTaskIdByModelId(String repositoryId) {
//String sql = "SELECT pl.TASKID FROM APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl WHERE pl.pid = p.id AND pl.palrepositoryid = ? ORDER BY publishdate DESC";
String sql="SELECT * FROM (SELECT TASKID FROM BO_ACT_COE_PUBLISH_N WHERE PUBLISHFILEID=? ORDER BY CREATEDATE DESC) WHERE ROWNUM=1";
String sql="SELECT TASKID FROM (SELECT TASKID FROM BO_ACT_COE_PUBLISH_N WHERE PUBLISHFILEID=? ORDER BY CREATEDATE DESC) WHERE ROWNUM=1";
String taskId = DBSql.getObject(sql, new RowMapper<String>() {
@Override
public String mapRow(ResultSet rs, int arg1) throws SQLException {

View File

@ -1680,7 +1680,8 @@ function downloadZipFile(splitId,toolbarname) {
data : {
splitId : splitId,
toolbarname:toolbarname,
taskIdParams:taskId
taskIdParams:taskId,
methodId:methodId
},
success : function(msg) {
if (msg.result == "ok") {