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