|
|
|
@ -314,8 +314,8 @@ public class EvaluationServiceImpl implements EvaluationService {
|
|
|
|
|
boolean pushParent = appraiseVoteDto.isPushParent();
|
|
|
|
|
String targetType = appraiseVoteDto.getTargetType();
|
|
|
|
|
String appraiseId = appraiseVoteDto.getAppraiseId();
|
|
|
|
|
//User loginUser = SecurityUtil.getLoginUser();
|
|
|
|
|
String schoolId = "hbcn";
|
|
|
|
|
User loginUser = SecurityUtil.getLoginUser();
|
|
|
|
|
String schoolId = loginUser.getSchoolId();
|
|
|
|
|
String classId;
|
|
|
|
|
String className;
|
|
|
|
|
String periodId;
|
|
|
|
@ -376,8 +376,8 @@ public class EvaluationServiceImpl implements EvaluationService {
|
|
|
|
|
AppraiseRecordItem item = new AppraiseRecordItem();
|
|
|
|
|
item.setId(UUID.randomUUID().toString());
|
|
|
|
|
item.setAppraiseNode(appraiseTreeNode);
|
|
|
|
|
item.setCreator("zz");
|
|
|
|
|
item.setCreatorId("202106001");
|
|
|
|
|
item.setCreator(loginUser.getName());
|
|
|
|
|
item.setCreatorId(loginUser.getId());
|
|
|
|
|
item.setCreateTime(Instant.now().toEpochMilli());
|
|
|
|
|
// 处理学校与学生的差异
|
|
|
|
|
if (targetType.equals(TARGET_CLASS)) {
|
|
|
|
@ -416,7 +416,12 @@ public class EvaluationServiceImpl implements EvaluationService {
|
|
|
|
|
}
|
|
|
|
|
// 加分
|
|
|
|
|
//nt scoreToPlus = ObjectUtils.isEmpty(appraiseTreeNode.getScore()) ? 0 : appraiseTreeNode.getScore();
|
|
|
|
|
operations.increment("/score", appraiseTreeNode.isPraise() ? 1 : -1);
|
|
|
|
|
int incrementValue = appraiseTreeNode.isPraise() ? 1 : -1;
|
|
|
|
|
if (record.getScore() + incrementValue < 0) {
|
|
|
|
|
operations.set("/score", 0);
|
|
|
|
|
}else {
|
|
|
|
|
operations.increment("/score", incrementValue);
|
|
|
|
|
}
|
|
|
|
|
// patch doc
|
|
|
|
|
appraiseRecordRepository.save(record.getId(), PK.buildOf(PK.PK_APPRAISE_RECORD, schoolId), AppraiseRecord.class, operations);
|
|
|
|
|
}
|
|
|
|
@ -486,8 +491,8 @@ public class EvaluationServiceImpl implements EvaluationService {
|
|
|
|
|
|
|
|
|
|
public List<StudentReportVo> Reports(ReportDto reportDto) {
|
|
|
|
|
// 获取当前登录用户和学校信息
|
|
|
|
|
//User user = SecurityUtil.getLoginUser();
|
|
|
|
|
String schoolId = "hbcn";
|
|
|
|
|
User user = SecurityUtil.getLoginUser();
|
|
|
|
|
String schoolId = user.getSchoolId();
|
|
|
|
|
|
|
|
|
|
// 获取学生 ID 列表
|
|
|
|
|
List<String> studentIds = reportDto.getIds();
|
|
|
|
|