相关文件筛选bug修复

This commit is contained in:
zhal 2022-07-30 18:47:16 +08:00
parent 434c3a483a
commit 2616e51c46
2 changed files with 36 additions and 22 deletions

View File

@ -1168,11 +1168,11 @@ public class CoEPALController {
* @param params
* @return
*/
@Mapping("com.actionsoft.apps.coe.pal_outputreport_output_downloadfile")
public String COEPALOUTPUTREPORTOutputProcessDownloadFILE(UserContext me, RequestParams params) {
@Mapping("com.actionsoft.apps.coe.pal_outputreport_output_downloadZipfile")
public String COEPALOUTPUTREPORTOutputProcessDownloadZipFILE(UserContext me, RequestParams params) throws Exception {
UpfileWeb web = new UpfileWeb(me);
String uuid = params.get("uuid");
return web.readFileDownLoad(uuid);
return web.readZipFileDownLoad(uuid);
}

View File

@ -18,6 +18,7 @@ import com.actionsoft.apps.coe.pal.cooperation.CoeCooperationAPIManager;
import com.actionsoft.apps.coe.pal.pal.method.model.PALMethodAttributeModel;
import com.actionsoft.apps.coe.pal.pal.repository.designer.CoeDesignerShapeAPIManager;
import com.actionsoft.apps.coe.pal.pal.repository.designer.relation.manager.DesignerShapeCopyCache;
import com.actionsoft.apps.coe.pal.pal.repository.model.impl.PALRepositoryModelImpl;
import com.actionsoft.apps.coe.pal.pal.repository.web.CoeProcessLevelWeb;
import com.actionsoft.apps.coe.pal.system.util.StringUtil;
import com.actionsoft.apps.coe.pal.util.BpmOrgUtil;
@ -854,24 +855,36 @@ public class DesignerRelationShapeWeb extends ActionWeb {
}
}
macroLibraries.put("treeData", jsonArr_new.toString());
} else if(attrId.equals("R_relevant_flies")){
}else if(attrId.equals("R_relevant_flies")){
boolean publishflag=true;
for (int i = 0; i < objects.size(); i++) {
JSONObject jsonObject = objects.getJSONObject(i);
String isPublish=jsonObject.getString("isPublish");
if(isPublish!=null){
if(isPublish.equals("true")){
JSONObject node = objects.getJSONObject(i);
node.put("nocheck", "false");
jsonArr_new.add(node);
String isParent=jsonObject.getString("isParent");
String id=jsonObject.getString("id");
if(isParent!=null){
if(isParent.equals("false")){
if(isPublish!=null){
RowMap rowMap=DBSql.getMap("SELECT * FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME=? AND ISPUBLISH=? AND ISUSE=?",jsonObject.getString("name"),1,1);
if(rowMap!=null){
jsonObject.put("nocheck",false);
jsonArr_new.add(jsonObject);
}
}
}else{
jsonObject.put("nocheck", true);
jsonArr_new.add(jsonObject);
}
}else{
jsonArr_new.add(objects.getJSONObject(i));
jsonObject.put("nocheck", true);
jsonArr_new.add(jsonObject);
}
}
macroLibraries.put("treeData", jsonArr_new.toString());
}else if(attrId.equals("support_files")) {
} else if(attrId.equals("support_files")) {
for (int i = 0; i < objects.size(); i++) {
JSONObject jsonObject = objects.getJSONObject(i);
@ -889,7 +902,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
}
macroLibraries.put("treeData", jsonArr_new.toString());
}else{
macroLibraries.put("treeData", jsonArr_new.toString());
macroLibraries.put("treeData", treeJson);
}
@ -953,6 +966,9 @@ public class DesignerRelationShapeWeb extends ActionWeb {
return HtmlPageTemplate.merge(CoEConstant.APP_ID, "pal.pl.repository.designer.shapes.htm", macroLibraries);
}
public String getTreeJson(String wsId, String pid, String category, String type, String method, String ruuid,String attrId) {
StringBuffer treeJson = new StringBuffer();
if (pid.equals("")) {
@ -1037,7 +1053,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
controlpmjm.setOpen(true);
jsonArray.add(controlpmjm);
if(attrId.equals("R_relevant_flies")||attrId.equals("support_files")){
/*if(attrId.equals("R_relevant_flies")||attrId.equals("support_files")){
PALMethodJsonModel controlpmjm1 = new PALMethodJsonModel();
controlpmjm1.setId("process");
controlpmjm1.setName(I18nRes.findValue(CoEConstant.APP_ID, "process"));
@ -1056,7 +1072,7 @@ public class DesignerRelationShapeWeb extends ActionWeb {
controlpmjm2.setMenu(false);
controlpmjm2.setOpen(true);
jsonArray.add(controlpmjm2);
}
}*/
JSONArray nodes = PALRepositoryQueryAPIManager.getInstance().getUsedPalRepositoryTreeDataByPid(_uc, wsuuid, controlpmjm.getId());
@ -1212,21 +1228,19 @@ public class DesignerRelationShapeWeb extends ActionWeb {
String isPublish=node.getString("isPublish");
String isParent=node.getString("isParent");
String isStop=node.getString("isStop");
String name=node.getString("name");
node.put("url", "./jd?sid=" + super.getContext().getSessionId() + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_process_models_info&ruuid=" + node.getString("id") + "&uuid=" + node.getString("id") + "&wsId=" + wsId);
String id = node.getString("id");
PALRepositoryModel model = PALRepositoryCache.getCache().get(id);
if (model != null) {
/*if (!model.getMethodCategory().equals(methodScope) && !model.getMethodId().equals(methodScope)) {
node.put("nocheck", true);
}else */
//如果为相关文件 未发布不可选中
if(attrId.equals("R_relevant_flies")){
if(isPublish.equals("false") || isParent.equals("true")){
RowMap rowMap=DBSql.getMap("SELECT * FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME=? AND ISPUBLISH=? AND ISUSE=?", name,1,1);
if(isParent.equals("true")){
node.put("nocheck", true);
}
}else{
if(isPublish.equals("false")){
result.add(node);
}else if(isParent.equals("false") && rowMap!=null){
node.put("nocheck", false);
}
}