diff --git a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/Business.java b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/Business.java index 7566c92ec5a4b8cd58317f6edd1bf88304eccb22..61d707e84477369e223378ea672542c3a661b98f 100644 --- a/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/Business.java +++ b/o2server/x_processplatform_assemble_surface/src/main/java/com/x/processplatform/assemble/surface/Business.java @@ -420,50 +420,50 @@ public class Business { Activity o = null; if (null != activityType) { switch (activityType) { - case agent: - o = agent().pick(id); - break; - case begin: - o = begin().pick(id); - break; - case cancel: - o = cancel().pick(id); - break; - case choice: - o = choice().pick(id); - break; - case delay: - o = delay().pick(id); - break; - case embed: - o = embed().pick(id); - break; - case end: - o = end().pick(id); - break; - case invoke: - o = invoke().pick(id); - break; - case manual: - o = manual().pick(id); - break; - case merge: - o = merge().pick(id); - break; - case message: - o = message().pick(id); - break; - case parallel: - o = parallel().pick(id); - break; - case service: - o = service().pick(id); - break; - case split: - o = service().pick(id); - break; - default: - break; + case agent: + o = agent().pick(id); + break; + case begin: + o = begin().pick(id); + break; + case cancel: + o = cancel().pick(id); + break; + case choice: + o = choice().pick(id); + break; + case delay: + o = delay().pick(id); + break; + case embed: + o = embed().pick(id); + break; + case end: + o = end().pick(id); + break; + case invoke: + o = invoke().pick(id); + break; + case manual: + o = manual().pick(id); + break; + case merge: + o = merge().pick(id); + break; + case message: + o = message().pick(id); + break; + case parallel: + o = parallel().pick(id); + break; + case service: + o = service().pick(id); + break; + case split: + o = service().pick(id); + break; + default: + break; } } return o; @@ -723,7 +723,11 @@ public class Business { control.setAllowDelete(true); } else if (null != activity && Objects.equals(activity.getActivityType(), ActivityType.manual) && BooleanUtils.isTrue(((Manual) activity).getAllowDeleteWork())) { - if (null != task && StringUtils.equals(work.getCreatorPerson(), effectivePerson.getDistinguishedName())) { + // if (null != task && StringUtils.equals(work.getCreatorPerson(), + // effectivePerson.getDistinguishedName())) { + // control.setAllowDelete(true); + // } + if (null != task) { control.setAllowDelete(true); } } @@ -1203,20 +1207,22 @@ public class Business { /** * 下载附件并打包为zip + * * @param attachmentList * @param os * @throws Exception */ - public void downToZip(List attachmentList, OutputStream os, Map otherAttMap) throws Exception { + public void downToZip(List attachmentList, OutputStream os, Map otherAttMap) + throws Exception { Map filePathMap = new HashMap<>(); List emptyFolderList = new ArrayList<>(); /* 生成zip压缩文件内的目录结构 */ - if(attachmentList!=null) { + if (attachmentList != null) { for (Attachment att : attachmentList) { filePathMap.put(att.getName(), att); } } - try(ZipOutputStream zos = new ZipOutputStream(os)){ + try (ZipOutputStream zos = new ZipOutputStream(os)) { for (Map.Entry entry : filePathMap.entrySet()) { zos.putNextEntry(new ZipEntry(entry.getKey())); StorageMapping mapping = ThisApplication.context().storageMappings().get(Attachment.class, @@ -1229,7 +1235,7 @@ public class Business { } } - if(otherAttMap!=null){ + if (otherAttMap != null) { for (Map.Entry entry : otherAttMap.entrySet()) { zos.putNextEntry(new ZipEntry(entry.getKey())); zos.write(entry.getValue());