From cb5538f10805a0e1faa5cc61e529482abec9f340 Mon Sep 17 00:00:00 2001 From: yujh_java Date: Fri, 1 Aug 2025 10:27:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?dev=E5=88=86=E6=94=AF=E4=B8=8A=EF=BC=8C?= =?UTF-8?q?=E8=87=AA=E7=94=B1=E6=A8=A1=E5=9E=8B=E6=8F=90=E4=BA=A4=E5=9B=9E?= =?UTF-8?q?=E6=BB=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apps/coe/pal/CoEPALController.java | 4 +-- .../repository/web/CoeProcessLevelWeb.java | 32 ++++++------------- 2 files changed, 11 insertions(+), 25 deletions(-) diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java index e4aa0381..2431d66a 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/CoEPALController.java @@ -3050,9 +3050,9 @@ public class CoEPALController { * @return */ @Mapping("com.actionsoft.apps.coe.pal_processlevel_create_method_list") - public String getPalProcessLevelCreateMethodList(UserContext me, String category, String methodId , String fileId) { + public String getPalProcessLevelCreateMethodList(UserContext me, String category, String methodId) { CoeProcessLevelWeb web = new CoeProcessLevelWeb(me); - return web.getPalProcessLevelCreateMethodList(category, methodId,fileId); + return web.getPalProcessLevelCreateMethodList(category, methodId); } /** diff --git a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java index 40d07d12..cc3ebe9b 100755 --- a/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java +++ b/com.actionsoft.apps.coe.pal/src/com/actionsoft/apps/coe/pal/pal/repository/web/CoeProcessLevelWeb.java @@ -2611,9 +2611,6 @@ public class CoeProcessLevelWeb extends ActionWeb { plLevel = plModel.getLevel(); plOrderIndex = plModel.getOrderIndex(); methodId = plModel.getMethodId(); - if ("freedom.allmethod".equals(methodId)){ - macroLibraries.put("classification", I18nRes.findValue(CoEConstant.APP_ID, methodId)); - } for (int i = 0, methodSize = methodModels.size(); i < methodSize; i++) { PALMethodModel palMethodModel = methodModels.get(i); String appId = palMethodModel.getId(); @@ -8626,7 +8623,7 @@ public class CoeProcessLevelWeb extends ActionWeb { * @param methodId * @return */ - public String getPalProcessLevelCreateMethodList(String category, String methodId, String fileId) { + public String getPalProcessLevelCreateMethodList(String category, String methodId) { if(!"process.framework".equals(methodId) && !"default".equals(methodId)){//不是架构,或者文件夹 ResponseObject ro = ResponseObject.newErrResponse(); ro.msg("methodId:"+methodId+"当前所选择目录不是文件夹或者流程架构,请选择正确的目录!"); @@ -8667,29 +8664,18 @@ public class CoeProcessLevelWeb extends ActionWeb { methodObj.put("categoryName", I18nRes.findValue(CoEConstant.APP_ID, c)); methodObj.put("method", model.getId()); methodObj.put("methodName", I18nRes.findValue(CoEConstant.APP_ID, model.getId())); - if (!"freedom.allmethod".equals(model.getId())){ - if (model.getSchema().contains("架构KPI图")){ - methodObj.put("methodName", "架构KPI图"); - } - if (model.getSchema().contains("角色图")){ - methodObj.put("methodName", "角色图"); - } + if (model.getSchema().contains("架构KPI图")) { + methodObj.put("methodName", "架构KPI图"); + } + if (model.getSchema().contains("角色图")) { + methodObj.put("methodName", "角色图"); } // System.out.println(c+"对应的"+ PALMethodManager.getInstance().havingCreateMethodPerm(category, methodId, "process", model.getId())); //流程入口允许新建表单图和制度图 by金鹏 - if (model.getId().equals("freedom.allmethod")) { - if (StringUtils.isBlank(fileId)){ - methodObj.put("havingCreatePerm", false); - }else { - String property = SDK.getAppAPI().getProperty(CoEConstant.APP_ID, "freedom.file"); - if (StringUtils.isNotBlank(property)&&property.contains(fileId)){ - methodObj.put("havingCreatePerm", true); - }else { - methodObj.put("havingCreatePerm", false); - } - } - }else if (category.equals("process") && model.getSchema().contains("表单图")) { + if (category.equals("process") && model.getSchema().contains("表单图")) { + methodObj.put("havingCreatePerm", true); + } else if (category.equals("process") && model.getSchema().contains("制度")) { methodObj.put("havingCreatePerm", true); } else if (category.equals("process") && model.getSchema().contains("制度")) { methodObj.put("havingCreatePerm", true); From fd555c89d5ecc29ef6fcdb7c440c7a65b82b9c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A2=81=E4=B8=9C=E5=BC=BA?= <1559301693@qq.com> Date: Sat, 2 Aug 2025 23:46:40 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=80=BB=E8=A3=81?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E7=99=BD=E5=90=8D=E5=8D=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apps/integration/oa/TaskListener.java | 47 ++++++++++++++++--- 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/com.awspaas.user.apps.yili.integration/src/com/awspaas/user/apps/integration/oa/TaskListener.java b/com.awspaas.user.apps.yili.integration/src/com/awspaas/user/apps/integration/oa/TaskListener.java index b36d032b..5664d81f 100644 --- a/com.awspaas.user.apps.yili.integration/src/com/awspaas/user/apps/integration/oa/TaskListener.java +++ b/com.awspaas.user.apps.yili.integration/src/com/awspaas/user/apps/integration/oa/TaskListener.java @@ -18,6 +18,7 @@ import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.awspaas.user.apps.integration.XmlDatasUtil; import com.awspaas.user.apps.integration.util.HttpClientUtils; +import jodd.util.StringUtil; import org.dom4j.Document; import org.dom4j.DocumentException; import org.dom4j.DocumentHelper; @@ -488,9 +489,26 @@ public class TaskListener extends ProcessPubicListener { sendOaDataPending(taskInstance1,processInst_1,"10036614"); sendOaDataPending(taskInstance2,processInst_2,"00116580"); - - //挂起流程 - SDK.getProcessAPI().suspend(pec.getProcessInstance()); + try{ + boolean hasProperty = SDK.getAppAPI().hasProperty("com.awspaas.user.apps.yili.integration", "CEO_approval_whitelist"); + String property = ""; + if (hasProperty) { + property = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "CEO_approval_whitelist"); + } + if (StringUtil.isBlank(property) || !property.contains(pec.getProcessInstance().getId())) { + //挂起流程 + SDK.getProcessAPI().suspend(pec.getProcessInstance()); + } + }catch (Exception e){ + e.printStackTrace(); + logger.info("取消挂起总裁审批流程失败,失败原因:"+e.getMessage()); + try { + SDK.getProcessAPI().suspend(pec.getProcessInstance()); + }catch (Exception e1){ + e1.printStackTrace(); + logger.info("挂起总裁流程失败,失败原因:"+e1.getMessage()); + } + } } BO bo1=new BO(); bo1.set("PROCESSID",processId); @@ -542,9 +560,26 @@ public class TaskListener extends ProcessPubicListener { sendOaDataPending(taskInstance2,processInst_2,"00116580"); - - //挂起流程 - SDK.getProcessAPI().suspend(pec.getProcessInstance()); + try{ + boolean hasProperty = SDK.getAppAPI().hasProperty("com.awspaas.user.apps.yili.integration", "CEO_approval_whitelist"); + String property = ""; + if (hasProperty) { + property = SDK.getAppAPI().getProperty("com.awspaas.user.apps.yili.integration", "CEO_approval_whitelist"); + } + if (StringUtil.isBlank(property) || !property.contains(pec.getProcessInstance().getId())) { + //挂起流程 + SDK.getProcessAPI().suspend(pec.getProcessInstance()); + } + }catch (Exception e){ + e.printStackTrace(); + logger.info("取消挂起总裁审批流程失败,失败原因:"+e.getMessage()); + try { + SDK.getProcessAPI().suspend(pec.getProcessInstance()); + }catch (Exception e1){ + e1.printStackTrace(); + logger.info("挂起总裁流程失败,失败原因:"+e1.getMessage()); + } + } } bo.set("CEO_APPROVE",approve1); SDK.getBOAPI().update("BO_ACT_DATA_MONITORING",bo);