手册提交
This commit is contained in:
parent
d22e6e5158
commit
24ff9f2764
Binary file not shown.
@ -860,18 +860,7 @@ public class PublisherController {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 重新生成手册
|
||||
*
|
||||
* @param me
|
||||
* @param plId
|
||||
* @return
|
||||
*/
|
||||
@Mapping("com.actionsoft.apps.coe.pal.publisher_publish_Refresh_Manual")
|
||||
public String RefreshManual(UserContext me, String processInstId, String type) {
|
||||
ProcessPublishWeb web = new ProcessPublishWeb(me);
|
||||
return web.RefreshManual(processInstId, type);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -4634,131 +4634,7 @@ public class ProcessPublishWeb extends ActionWeb {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新生成手册
|
||||
*
|
||||
* @param plId
|
||||
* @return
|
||||
*/
|
||||
public String RefreshManual(String processInstId, String type) {
|
||||
ResponseObject ro = ResponseObject.newOkResponse();
|
||||
|
||||
try {
|
||||
if (type.equals("1")) {
|
||||
//发布新文件
|
||||
List<BO> publishNBO = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_N").bindId(processInstId).list();
|
||||
|
||||
if (publishNBO.size() > 0) {
|
||||
for (BO onePublishN : publishNBO) {
|
||||
|
||||
if (onePublishN.getString("TASKID").equals("submit_create")) {
|
||||
return ResponseObject.newWarnResponse("请先创建手册!!").toString();
|
||||
}
|
||||
String plId = onePublishN.getString("PUBLISHFILEID");
|
||||
int count = 0;
|
||||
// 重新生成手册
|
||||
PALRepositoryModel model = PALRepositoryCache.getCache().get(plId);
|
||||
String wsIdro = queryMaPublishGetWsId();
|
||||
JSONObject wsIdJson = JSONObject.parseObject(wsIdro);
|
||||
String taskId = createOutputReport(model, wsIdJson.getJSONObject("data").get("wsId").toString(), "admin", "", plId);
|
||||
// 刷新预览加载的表
|
||||
String sqlr = "UPDATE BO_EU_PAL_OUTPUTREPORT SET TASKID = '" + taskId + "' WHERE PLID = '" + plId + "'";
|
||||
DBSql.update(sqlr);
|
||||
String sql1 = "SELECT ID FROM BO_ACT_COE_PUBLISH_N WHERE PUBLISHFILEID = '" + plId + "'";
|
||||
String sql2 = "SELECT ID FROM BO_ACT_COE_PUBLISH_C WHERE CHANGEDFILEIDNEW = '" + plId + "'";
|
||||
if (UtilString.isNotEmpty(DBSql.getString(sql1))) {
|
||||
count = DBSql.update(
|
||||
"UPDATE BO_ACT_COE_PUBLISH_N SET TASKID='" + taskId + "'WHERE PUBLISHFILEID ='" + plId + "'");
|
||||
}
|
||||
if (count != 0) {
|
||||
DBSql.update("UPDATE APP_ACT_COE_PAL_PUBLISH_LIST SET TASKID='" + taskId + "'WHERE PALREPOSITORYID='"
|
||||
+ plId + "'");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} else if (type.equals("2")) {
|
||||
//发布变更文件
|
||||
List<BO> publishCBO = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_C").bindId(processInstId).list();
|
||||
|
||||
if (publishCBO.size() > 0) {
|
||||
|
||||
for (BO onePublishC : publishCBO) {
|
||||
|
||||
if (onePublishC.getString("TASKID") == "submit_create") {
|
||||
return ResponseObject.newWarnResponse("请先创建手册!!").toString();
|
||||
}
|
||||
|
||||
String plId = onePublishC.getString("CHANGEDFILEIDNEW");
|
||||
int count = 0;
|
||||
// 重新生成手册
|
||||
PALRepositoryModel model = PALRepositoryCache.getCache().get(plId);
|
||||
String wsIdro = queryMaPublishGetWsId();
|
||||
JSONObject wsIdJson = JSONObject.parseObject(wsIdro);
|
||||
String taskId = createOutputReport(model, wsIdJson.getJSONObject("data").get("wsId").toString(), "admin", "", plId);
|
||||
// 刷新预览加载的表
|
||||
String sqlr = "UPDATE BO_EU_PAL_OUTPUTREPORT SET TASKID = '" + taskId + "' WHERE PLID = '" + plId + "'";
|
||||
DBSql.update(sqlr);
|
||||
String sql2 = "SELECT ID FROM BO_ACT_COE_PUBLISH_C WHERE CHANGEDFILEIDNEW = '" + plId + "'";
|
||||
|
||||
if (UtilString.isNotEmpty(DBSql.getString(sql2))) {
|
||||
count = DBSql.update(
|
||||
"UPDATE BO_ACT_COE_PUBLISH_C SET TASKID='" + taskId + "'WHERE CHANGEDFILEIDNEW ='" + plId + "'");
|
||||
}
|
||||
if (count != 0) {
|
||||
DBSql.update("UPDATE APP_ACT_COE_PAL_PUBLISH_LIST SET TASKID='" + taskId + "'WHERE PALREPOSITORYID='"
|
||||
+ plId + "'");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
} else if (type.equals("3")) {
|
||||
//发布变更文件
|
||||
List<BO> publishSBO = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_S").bindId(processInstId).list();
|
||||
|
||||
if (publishSBO.size() > 0) {
|
||||
|
||||
for (BO onePublishS : publishSBO) {
|
||||
|
||||
/* if(onePublishC.getString("TASKID")=="submit_create"){
|
||||
return ResponseObject.newWarnResponse("请先创建手册!!").toString();
|
||||
}*/
|
||||
|
||||
String plId = onePublishS.getString("STOPFILEID");
|
||||
int count = 0;
|
||||
// 重新生成手册
|
||||
PALRepositoryModel model = PALRepositoryCache.getCache().get(plId);
|
||||
String wsIdro = queryMaPublishGetWsId();
|
||||
JSONObject wsIdJson = JSONObject.parseObject(wsIdro);
|
||||
String taskId = createOutputReport(model, wsIdJson.getJSONObject("data").get("wsId").toString(), "admin", "", plId);
|
||||
// 刷新预览加载的表
|
||||
String sqlr = "UPDATE BO_EU_PAL_OUTPUTREPORT SET TASKID = '" + taskId + "' WHERE PLID = '" + plId + "'";
|
||||
DBSql.update(sqlr);
|
||||
String sql2 = "SELECT ID FROM BO_ACT_COE_PUBLISH_S WHERE STOPFILEID = '" + plId + "'";
|
||||
|
||||
if (UtilString.isNotEmpty(DBSql.getString(sql2))) {
|
||||
count = DBSql.update(
|
||||
"UPDATE BO_ACT_COE_PUBLISH_S SET TASKID='" + taskId + "'WHERE STOPFILEID ='" + plId + "'");
|
||||
}
|
||||
if (count != 0) {
|
||||
DBSql.update("UPDATE APP_ACT_COE_PAL_PUBLISH_LIST SET TASKID='" + taskId + "'WHERE PALREPOSITORYID='"
|
||||
+ plId + "'");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (AWSDataAccessException e) {
|
||||
ro.put("result", "创建手册失败!!!");
|
||||
e.printStackTrace();
|
||||
}
|
||||
return ro.toString();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user