|
|
@ -56,6 +56,7 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
|
|
|
|
|
|
|
|
|
|
|
|
entity.setWorkgroup(reqWorkgroup);
|
|
|
|
entity.setWorkgroup(reqWorkgroup);
|
|
|
|
entity.setNumser(this.getNumberSerie());
|
|
|
|
entity.setNumser(this.getNumberSerie());
|
|
|
|
|
|
|
|
this.addWorkflow(entity);
|
|
|
|
|
|
|
|
|
|
|
|
super.add(entity);
|
|
|
|
super.add(entity);
|
|
|
|
|
|
|
|
|
|
|
@ -79,6 +80,7 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (Workflow w : entity.getType().getWorkflow()) {
|
|
|
|
for (Workflow w : entity.getType().getWorkflow()) {
|
|
|
|
|
|
|
|
if ((entity.getWorkgroup() != null && !w.getCentre()) || w.getCentre()) {
|
|
|
|
Workflow workflow = new Workflow();
|
|
|
|
Workflow workflow = new Workflow();
|
|
|
|
workflow.setCentre(w.getCentre());
|
|
|
|
workflow.setCentre(w.getCentre());
|
|
|
|
workflow.setLimit(w.getLimit());
|
|
|
|
workflow.setLimit(w.getLimit());
|
|
|
@ -87,13 +89,13 @@ public abstract class RequirementBaseServiceImpl<T extends RequirementBase> exte
|
|
|
|
entity.getWorkflow().add(workflow);
|
|
|
|
entity.getWorkflow().add(workflow);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
@Transactional
|
|
|
|
@Transactional
|
|
|
|
public List<User> getNextApprover(T entity) {
|
|
|
|
public List<User> getNextApprover(T entity) {
|
|
|
|
T e = (T) dao.getById(entity.getId());
|
|
|
|
T e = (T) dao.getById(entity.getId());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<User> users = new ArrayList<User>();
|
|
|
|
List<User> users = new ArrayList<User>();
|
|
|
|
Workgroup wg;
|
|
|
|
Workgroup wg;
|
|
|
|
Workflow wf = getNextWorkflow(e);
|
|
|
|
Workflow wf = getNextWorkflow(e);
|
|
|
|