|
|
|
@ -96,29 +96,6 @@ public class EvaluationServiceImpl implements EvaluationService {
|
|
|
|
|
return appraise;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取默认的评价树
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
public Appraise getDefaultTree(){
|
|
|
|
|
Appraise appraise = appraiseRepository.findAppraiseById("default",new PartitionKey(PK.PK_APPRAISE));
|
|
|
|
|
|
|
|
|
|
// 如果传参 period 所在没有 tree 的话,则复制一份模板 tree 给他 (处理节点 id)
|
|
|
|
|
if (appraise == null) {
|
|
|
|
|
appraise = RepositoryUtil.findOne(appraiseRepository.findTemplateTree(), "获取模板评价树失败");
|
|
|
|
|
if (appraise == null) {
|
|
|
|
|
throw new ServiceException("模板评价树不存在");
|
|
|
|
|
}
|
|
|
|
|
// refresh
|
|
|
|
|
refreshAppraiseTree(appraise);
|
|
|
|
|
appraise.setId(null);
|
|
|
|
|
appraise = appraiseRepository.save(appraise);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return this.buildTree(appraise);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public Appraise getTree(GetEvaluateTreeDto getEvaluateTreeDto) {
|
|
|
|
|
String periodId = getEvaluateTreeDto.getPeriodId();
|
|
|
|
|