优化发起任务
This commit is contained in:
parent
dc2f9cdb3f
commit
49b5ded432
@ -204,9 +204,13 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
||||
EvaluationGroup evaluationGroup = evaluationGroups.get(n);
|
||||
//下面初始化员工考核流程
|
||||
List<StaffSimpleInfo> staffIds = evaluationGroupService.selectAllStaffSimpleInfoByGroupId(evaluationGroup);
|
||||
if(staffIds.size() == 0){
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
||||
|
||||
return R.error(evaluationGroup.getName() + "——无有效考核人员");
|
||||
}
|
||||
if(flowStart.getIsDelete() != null){//已经发起过的
|
||||
//下面去调已经发起的用户
|
||||
//下面去掉已经发起的用户
|
||||
List<Long> longs = evaluationStartStaffService.selectStaffIdsByStartAndStaffId(flowStart.getId(), staffIds);
|
||||
if(longs.size() > 0){
|
||||
Map<Long, StaffSimpleInfo> map
|
||||
@ -216,15 +220,16 @@ public class FlowStartServiceImpl extends ServiceImpl<FlowStartMapper, FlowStart
|
||||
map.remove(key);
|
||||
}
|
||||
staffIds = map.values().stream().collect(Collectors.toList());
|
||||
|
||||
if(staffIds.size() == 0){
|
||||
return R.error(evaluationGroup.getName() + "——本次发起参与人员为0");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if(staffIds.size() == 0){
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();//事务回滚
|
||||
|
||||
return R.error(evaluationGroup.getName() + "——无有效考核人员");
|
||||
}
|
||||
switch (start(evaluationGroup, flowStart, staffManages, staffIds, mustRole, selfMustRole)){
|
||||
|
||||
case 1:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user