去掉输出语句
This commit is contained in:
parent
fdef468c5a
commit
fe71eadb19
Binary file not shown.
@ -419,6 +419,19 @@ public class PublisherController {
|
|||||||
return web.getPublisherData(processInstId, wsId);
|
return web.getPublisherData(processInstId, wsId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取字表数据
|
||||||
|
* @param me
|
||||||
|
* @param processInstId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal.publisher_data_query_getFile")
|
||||||
|
public String getPublisherDataGetFile(UserContext me, String processInstId, String wsId) {
|
||||||
|
ProcessPublishWeb web = new ProcessPublishWeb(me);
|
||||||
|
return web.getPublisherDataGetFile(processInstId, wsId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否开启三员管理
|
* 是否开启三员管理
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
@ -1073,8 +1073,6 @@ public class ProcessPublishWeb extends ActionWeb {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取有权限的流程树(多个资产库)
|
* 获取有权限的流程树(多个资产库)
|
||||||
*
|
*
|
||||||
@ -1893,6 +1891,169 @@ public class ProcessPublishWeb extends ActionWeb {
|
|||||||
return ro.toString();
|
return ro.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getPublisherDataGetFile(String processInstId, String wsId){
|
||||||
|
ResponseObject ro = ResponseObject.newOkResponse();
|
||||||
|
boolean closeFormPage = SDK.getAppAPI().getPropertyBooleanValue(PublisherConf.APPID, "closeFormPage", false);
|
||||||
|
ro.put("closeFormPage", closeFormPage);
|
||||||
|
JSONObject newObj = new JSONObject();
|
||||||
|
JSONObject changeObj = new JSONObject();
|
||||||
|
JSONObject stopObj = new JSONObject();
|
||||||
|
boolean proNumber = false;
|
||||||
|
List<TaskInstance> list = SDK.getTaskQueryAPI().processInstId(processInstId).list();
|
||||||
|
|
||||||
|
if (!list.isEmpty())
|
||||||
|
for (TaskInstance taskIn : list)
|
||||||
|
if ("obj_87371cad5d54457e8c325c805028a56f".equals(taskIn.getActivityDefId()))
|
||||||
|
proNumber = true;
|
||||||
|
ro.put("proNumber", proNumber);
|
||||||
|
BO publish = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH").detailByBindId(processInstId);
|
||||||
|
if (publish != null) {
|
||||||
|
boolean isEnd = publish.isEnd();
|
||||||
|
ro.put("isEnd", isEnd);
|
||||||
|
String bindId = publish.getBindId();
|
||||||
|
BO newBo = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_N").detailByBindId(bindId);
|
||||||
|
if (newBo != null) {
|
||||||
|
String publishId = newBo.getString("PUBLISHFILEID");
|
||||||
|
newObj.put("publishDesc", newBo.getString("PUBLISHDESC"));
|
||||||
|
newObj.put("publishFileName", newBo.getString("PUBLISHFILENAME"));
|
||||||
|
newObj.put("publishFileId", newBo.getString("PUBLISHFILEID"));
|
||||||
|
PALRepositoryModel model = PALRepositoryCache.getCache().get(publishId);
|
||||||
|
if (model != null) {
|
||||||
|
String id = model.getId();
|
||||||
|
newObj.put("fileVersion", VersionUtil.getVersionStr(model.getVersion()));
|
||||||
|
newObj.put("methodId", model.getMethodId());
|
||||||
|
newObj.put("category", model.getMethodCategory());
|
||||||
|
|
||||||
|
// List<Map<String, Object>> shapeMessageJson4 =
|
||||||
|
// getShapeMessageJson4(publishId);
|
||||||
|
// 当前流程所有节点
|
||||||
|
|
||||||
|
List<String> shapeIds = new ArrayList<>();
|
||||||
|
List<Map<String, Object>> shapeList = CoeDesignerUtil.getShapeMessageJson2(publishId);// 获取所有节点
|
||||||
|
if (shapeList != null && shapeList.size() > 0)
|
||||||
|
for (Map<String, Object> map : shapeList)
|
||||||
|
shapeIds.add((String) map.get("id"));
|
||||||
|
|
||||||
|
/******************** 附件 ************************/
|
||||||
|
// 文件或节点自身附件
|
||||||
|
JSONArray js = new JSONArray();
|
||||||
|
UpFileDao upFileDao = new UpFileDao();
|
||||||
|
StringBuilder sqlWhere = new StringBuilder();
|
||||||
|
sqlWhere.append(" and PALREPOSITORYID ='").append(publishId).append("'");
|
||||||
|
List<UpfileModel> fileList = upFileDao.search(sqlWhere.toString());
|
||||||
|
if (fileList != null && fileList.size() > 0)
|
||||||
|
for (UpfileModel upfileModel : fileList)
|
||||||
|
if ("f".equals(upfileModel.getType())) {
|
||||||
|
JSONObject jb = new JSONObject();
|
||||||
|
String upfileId = upfileModel.getUuid();
|
||||||
|
String upFileName = upfileModel.getFileName();
|
||||||
|
jb.put("upfileId", upfileId);
|
||||||
|
jb.put("upFileName", upFileName);
|
||||||
|
String openUrl = "";
|
||||||
|
ResponseObject ros = getUrl("f",jb,upfileModel);
|
||||||
|
JSONObject parseObject = JSON.parseObject(JSON.toJSONString(ros.getData()));
|
||||||
|
String url = parseObject.get("url").toString();
|
||||||
|
if(url.contains(".xls"))
|
||||||
|
openUrl= url;
|
||||||
|
else
|
||||||
|
openUrl = SDK.getConfAPI().getPortalUrl() + "/r/" + url.replace("./", "");
|
||||||
|
jb.put("openUrl",openUrl);
|
||||||
|
js.add(jb.toJSONString());
|
||||||
|
}
|
||||||
|
newObj.put("upfileId", js);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
newObj.put("fileVersion", "1.0");
|
||||||
|
newObj.put("methodId", "1");
|
||||||
|
newObj.put("category", "1");
|
||||||
|
}
|
||||||
|
newObj.put("taskId", newBo.getString("TASKID"));
|
||||||
|
}
|
||||||
|
BO changeBo = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_C").detailByBindId(bindId);
|
||||||
|
if (changeBo != null) {
|
||||||
|
String changeId = changeBo.getString("CHANGEFILEID");
|
||||||
|
changeObj.put("changeFileName", changeBo.getString("CHANGEFILENAME"));
|
||||||
|
changeObj.put("changedFileNameNew", changeBo.getString("CHANGEDFILENAMENEW"));
|
||||||
|
changeObj.put("changeFileId", changeBo.getString("CHANGEFILEID"));
|
||||||
|
changeObj.put("changedDesc", changeBo.getString("CHANGEDDESC"));
|
||||||
|
changeObj.put("changedFileIdNew", changeBo.getString("CHANGEDFILEIDNEW"));
|
||||||
|
changeObj.put("taskId", changeBo.getString("TASKID"));
|
||||||
|
JSONArray array = new JSONArray();
|
||||||
|
PALRepositoryModel model = PALRepositoryCache.getCache().get(changeBo.getString("CHANGEFILEID"));
|
||||||
|
if (model != null) {
|
||||||
|
changeObj.put("fileVersion", VersionUtil.getVersionStr(model.getVersion()));
|
||||||
|
changeObj.put("methodId", model.getMethodId());
|
||||||
|
changeObj.put("category", model.getMethodCategory());
|
||||||
|
List<PALRepositoryModel> list2 = PALRepositoryCache.getByVersionId(wsId, model.getVersionId());
|
||||||
|
if (list2 != null && list2.size() > 0)
|
||||||
|
Collections.sort(list2, new Comparator<PALRepositoryModel>() {
|
||||||
|
@Override
|
||||||
|
public int compare(PALRepositoryModel o1, PALRepositoryModel o2) {
|
||||||
|
return VersionUtil.compareVersionNo(o1.getVersion(), o2.getVersion(), true); //升序
|
||||||
|
}
|
||||||
|
});
|
||||||
|
for (PALRepositoryModel model2 : list2)
|
||||||
|
if (!model2.getId().equals(changeObj.getString("changeFileId")) && !model2.isPublish()) {
|
||||||
|
JSONObject object = new JSONObject();
|
||||||
|
object.put("text", model2.getName());
|
||||||
|
object.put("id", model2.getId());
|
||||||
|
object.put("version", VersionUtil.getVersionStr(model2.getVersion()));
|
||||||
|
array.add(object);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// List<Map<String, Object>> shapeMessageJson4 =
|
||||||
|
// getShapeMessageJson4(publishId);
|
||||||
|
// 当前流程所有节点
|
||||||
|
|
||||||
|
List<String> shapeIds = new ArrayList<>();
|
||||||
|
List<Map<String, Object>> shapeList = CoeDesignerUtil.getShapeMessageJson2(changeId);// 获取所有节点
|
||||||
|
if (shapeList != null && shapeList.size() > 0)
|
||||||
|
for (Map<String, Object> map : shapeList)
|
||||||
|
shapeIds.add((String) map.get("id"));
|
||||||
|
/******************** 附件 ************************/
|
||||||
|
// 文件或节点自身附件
|
||||||
|
JSONArray js = new JSONArray();
|
||||||
|
UpFileDao upFileDao = new UpFileDao();
|
||||||
|
StringBuilder sqlWhere = new StringBuilder();
|
||||||
|
sqlWhere.append(" and PALREPOSITORYID ='").append(changeId).append("'");
|
||||||
|
List<UpfileModel> fileList = upFileDao.search(sqlWhere.toString());
|
||||||
|
if (fileList != null && fileList.size() > 0)
|
||||||
|
for (UpfileModel upfileModel : fileList)
|
||||||
|
if ("f".equals(upfileModel.getType())) {
|
||||||
|
JSONObject jb = new JSONObject();
|
||||||
|
String upfileId = upfileModel.getUuid();
|
||||||
|
String upFileName = upfileModel.getFileName();
|
||||||
|
jb.put("upfileId", upfileId);
|
||||||
|
jb.put("upFileName", upFileName);
|
||||||
|
String openUrl = "";
|
||||||
|
ResponseObject ros = getUrl("f",jb,upfileModel);
|
||||||
|
JSONObject parseObject = JSON.parseObject(JSON.toJSONString(ros.getData()));
|
||||||
|
String url = parseObject.get("url").toString();
|
||||||
|
if(url.contains(".xls"))
|
||||||
|
openUrl= url;
|
||||||
|
else
|
||||||
|
openUrl = SDK.getConfAPI().getPortalUrl() + "/r/" + url.replace("./", "");
|
||||||
|
jb.put("openUrl",openUrl);
|
||||||
|
js.add(jb.toJSONString());
|
||||||
|
}
|
||||||
|
changeObj.put("upfileId", js);
|
||||||
|
} else {
|
||||||
|
changeObj.put("fileVersion", "1.0");
|
||||||
|
changeObj.put("methodId", "1");
|
||||||
|
changeObj.put("category", "1");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
ro.put("newData", newObj);
|
||||||
|
ro.put("changeData", changeObj);
|
||||||
|
ro.put("stopData", stopObj);
|
||||||
|
return ro.toString();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询树结构
|
* 查询树结构
|
||||||
*
|
*
|
||||||
@ -1926,7 +2087,7 @@ public class ProcessPublishWeb extends ActionWeb {
|
|||||||
else if ("change".equals(type))
|
else if ("change".equals(type))
|
||||||
array = getPublishedRepositoryTreeData2(wsId, teamId);
|
array = getPublishedRepositoryTreeData2(wsId, teamId);
|
||||||
else
|
else
|
||||||
array = getPublishedRepositoryTreeData(wsId, teamId);
|
array = getPublishedRepositoryTreeData(wsId, teamId,flag,pid);
|
||||||
if (array == null || array.isEmpty())
|
if (array == null || array.isEmpty())
|
||||||
array = new JSONArray();
|
array = new JSONArray();
|
||||||
ro.put("data", array);
|
ro.put("data", array);
|
||||||
@ -2176,7 +2337,7 @@ public class ProcessPublishWeb extends ActionWeb {
|
|||||||
* @param teamId
|
* @param teamId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private JSONArray getPublishedRepositoryTreeData(String wsId, String teamId) {
|
private JSONArray getPublishedRepositoryTreeData(String wsId, String teamId,boolean flag,String pid) {
|
||||||
PALRepository dao = new PALRepository();
|
PALRepository dao = new PALRepository();
|
||||||
if (UtilString.isNotEmpty(teamId)) {
|
if (UtilString.isNotEmpty(teamId)) {
|
||||||
// 小组Id不为空,则需要查询小组授权后的流程库
|
// 小组Id不为空,则需要查询小组授权后的流程库
|
||||||
@ -2184,7 +2345,7 @@ public class ProcessPublishWeb extends ActionWeb {
|
|||||||
if (team != null)
|
if (team != null)
|
||||||
wsId = team.getWsId();
|
wsId = team.getWsId();
|
||||||
}
|
}
|
||||||
List<PALRepositoryModel> list = dao.getPublishedRepositoryList(wsId);
|
List<PALRepositoryModel> list = dao.getPublishedRepositoryListByStop(wsId);
|
||||||
// List<String> versionIds = CoeCooperationAPIManager.getInstance().queryCooperationRoleDataPermByTeamUser(teamId, _uc.getUID());
|
// List<String> versionIds = CoeCooperationAPIManager.getInstance().queryCooperationRoleDataPermByTeamUser(teamId, _uc.getUID());
|
||||||
Set<String> versionIds = CooperationCache.getUserDataVisitablePermission(teamId, _uc.getUID(), false);
|
Set<String> versionIds = CooperationCache.getUserDataVisitablePermission(teamId, _uc.getUID(), false);
|
||||||
if (UtilString.isNotEmpty(teamId))
|
if (UtilString.isNotEmpty(teamId))
|
||||||
@ -2197,6 +2358,8 @@ public class ProcessPublishWeb extends ActionWeb {
|
|||||||
}
|
}
|
||||||
JSONArray treeData = getRepositoryTree(list, wsId, false, true, "-", false);
|
JSONArray treeData = getRepositoryTree(list, wsId, false, true, "-", false);
|
||||||
return treeData;
|
return treeData;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -3418,7 +3581,6 @@ public class ProcessPublishWeb extends ActionWeb {
|
|||||||
if (list != null && list.size() > 0)
|
if (list != null && list.size() > 0)
|
||||||
for (BO bo : list) {
|
for (BO bo : list) {
|
||||||
ProcessInstance instanceById = SDK.getProcessAPI().getInstanceById(bo.getBindId());
|
ProcessInstance instanceById = SDK.getProcessAPI().getInstanceById(bo.getBindId());
|
||||||
System.err.println("--------instanceById-------"+instanceById);
|
|
||||||
if (instanceById != null) {
|
if (instanceById != null) {
|
||||||
if ("terminate".equals(instanceById.getControlState())) {
|
if ("terminate".equals(instanceById.getControlState())) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user