update 评价调整

develop
hhb@hotmail.com 2 months ago
parent e886151639
commit 31df666440

@ -31,8 +31,8 @@ public interface AppraiseRepository extends CosmosRepository<Appraise, String> {
*/
@Query("SELECT * FROM School AS s where s.code = 'Appraise' and s.schoolId = 'template'")
List<Appraise> findTemplateTree();
@Query("SELECT value n FROM School AS s join n in s.nodes where s.code = @code and n.id = @nodeId")
List<AppraiseTreeNode> findNodeById(@Param("code") String code, @Param("nodeId") String nodeId);
@Query("SELECT value n FROM School AS s join n in s.nodes where s.code = @code and n.id = @nodeId and s.periodId = @periodId")
List<AppraiseTreeNode> findNodeById(@Param("code") String code, @Param("nodeId") String nodeId,@Param("periodId") String periodId);
@Query("select n.id, n.name from School as c join n in c.nodes where c.code = @code and n.id in (@ids)")
List<AppraiseTreeNode> findAllByCodeAndIdIn(String code, Set<String> ids);
@Query("SELECT c.id, c.achievementRules FROM School AS c where c.code = 'Appraise' and c.schoolId = @schoolId and c.periodId = @periodId")

@ -350,7 +350,7 @@ public class EvaluationServiceImpl implements EvaluationService {
}
// 获取评价项节点
List<AppraiseTreeNode> nodes = appraiseRepository.findNodeById(PK.PK_APPRAISE, appraiseId);
List<AppraiseTreeNode> nodes = appraiseRepository.findNodeById(PK.PK_APPRAISE, appraiseId,periodId);
AppraiseTreeNode appraiseTreeNode = RepositoryUtil.findOne(nodes, "该评价项不存在");
if (appraiseTreeNode.getPath() == null) {
throw new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "仅能评价三级评价项");

Loading…
Cancel
Save