|
@@ -308,6 +308,7 @@ public class ActHxpapplyServiceImpl implements IActHxpapplyService
|
|
|
//这里做一个跳过审核的map,暂时这么写吧,没有想到更好的办法了,啊啊啊啊,头疼(1表示第一次申请人就是审批人的需要跳过,2表示需要结束跳过)
|
|
//这里做一个跳过审核的map,暂时这么写吧,没有想到更好的办法了,啊啊啊啊,头疼(1表示第一次申请人就是审批人的需要跳过,2表示需要结束跳过)
|
|
|
Map<String,Long> jumpApply = new HashMap<>();
|
|
Map<String,Long> jumpApply = new HashMap<>();
|
|
|
jumpApply.put("jumpApply",1L);
|
|
jumpApply.put("jumpApply",1L);
|
|
|
|
|
+ Predicate<List <ActAudituser>> pre = x->Optional.ofNullable(x).orElseGet(Collections::emptyList).stream().filter(y->y.getAuditUserId()==createUserId).count()>0;
|
|
|
Optional.ofNullable(actAuditconfigList).orElseGet(Collections::emptyList)
|
|
Optional.ofNullable(actAuditconfigList).orElseGet(Collections::emptyList)
|
|
|
.stream()
|
|
.stream()
|
|
|
.map(a->{
|
|
.map(a->{
|
|
@@ -321,13 +322,15 @@ public class ActHxpapplyServiceImpl implements IActHxpapplyService
|
|
|
ActApplytaskNode actApplytaskNode = new ActApplytaskNode();
|
|
ActApplytaskNode actApplytaskNode = new ActApplytaskNode();
|
|
|
StringBuffer stringBuffer = new StringBuffer();
|
|
StringBuffer stringBuffer = new StringBuffer();
|
|
|
//这里生成或签的规则。
|
|
//这里生成或签的规则。
|
|
|
|
|
+ jumpApplyFun(pre,collect,jumpApply,actApplytaskNode);
|
|
|
Optional.ofNullable(collect).orElseGet(Collections::emptyList)
|
|
Optional.ofNullable(collect).orElseGet(Collections::emptyList)
|
|
|
.stream()
|
|
.stream()
|
|
|
.forEach(c1->{
|
|
.forEach(c1->{
|
|
|
stringBuffer.append(",");
|
|
stringBuffer.append(",");
|
|
|
stringBuffer.append(c1.getAuditUserId());
|
|
stringBuffer.append(c1.getAuditUserId());
|
|
|
- jumpApplyFun(createUserId,c1.getAuditUserId(),jumpApply,actApplytaskNode);
|
|
|
|
|
|
|
+
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
if(stringBuffer.length()>0){
|
|
if(stringBuffer.length()>0){
|
|
|
actApplytaskNode.setNodeName("流程节点:"+countAdder.sum());
|
|
actApplytaskNode.setNodeName("流程节点:"+countAdder.sum());
|
|
|
actApplytaskNode.setApplytaskId(actApplytask.getId());
|
|
actApplytaskNode.setApplytaskId(actApplytask.getId());
|
|
@@ -387,7 +390,18 @@ public class ActHxpapplyServiceImpl implements IActHxpapplyService
|
|
|
actApplytaskMapper.updateActApplytask(actApplytask);
|
|
actApplytaskMapper.updateActApplytask(actApplytask);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- //todo 这里处理一下跳过审核,只有当前审批人是申请人的时候,才做审批通过
|
|
|
|
|
|
|
+ //todo 这里处理一下跳过审核,只有当前审批人是申请人的时候,才做审批通过(或审)
|
|
|
|
|
+ private void jumpApplyFun(Predicate<List <ActAudituser>> pre,List <ActAudituser> actAuditusers,Map<String,Long> jumpApply,ActApplytaskNode actApplytaskNode){
|
|
|
|
|
+ if(pre.test(actAuditusers) && jumpApply.get("jumpApply")==1){
|
|
|
|
|
+ actApplytaskNode.setNodeStatus(1);
|
|
|
|
|
+ actApplytaskNode.setApplyUserid(SecurityUtils.getUserId());
|
|
|
|
|
+ jumpApply.put("jumpApply",1L);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ jumpApply.put("jumpApply",2L);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //todo 这里处理一下跳过审核,只有当前审批人是申请人的时候,才做审批通过(依次审批)
|
|
|
private void jumpApplyFun(Long createUserId,Long auditUserId,Map<String,Long> jumpApply,ActApplytaskNode actApplytaskNode){
|
|
private void jumpApplyFun(Long createUserId,Long auditUserId,Map<String,Long> jumpApply,ActApplytaskNode actApplytaskNode){
|
|
|
if(createUserId == auditUserId && jumpApply.get("jumpApply")==1){
|
|
if(createUserId == auditUserId && jumpApply.get("jumpApply")==1){
|
|
|
actApplytaskNode.setNodeStatus(1);
|
|
actApplytaskNode.setNodeStatus(1);
|