|
|
@@ -256,6 +256,10 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
|
|
|
.selectAs(BaseClass::getIsGraduate, CalssQuantitativeAssessmentPageVo::getClassStatus)
|
|
|
.leftJoin(XjrUser.class, XjrUser::getId, BaseClass::getTeacherId)
|
|
|
.leftJoin(BaseClassMajorSet.class, BaseClassMajorSet::getClassId, BaseClass::getId)
|
|
|
+ .eq(dto.getGradeId() != null, BaseClass::getGradeId, dto.getGradeId())
|
|
|
+ .eq(dto.getClassId() != null, BaseClass::getId, dto.getClassId())
|
|
|
+ .eq(dto.getClassStatus() != null, BaseClass::getIsGraduate, dto.getClassStatus())
|
|
|
+ .like(dto.getName() != null && !dto.getName().equals(""), XjrUser::getName, dto.getName())
|
|
|
.disableSubLogicDel();
|
|
|
|
|
|
IPage<CalssQuantitativeAssessmentPageVo> resultPage = baseClassMapper.selectJoinPage(page, CalssQuantitativeAssessmentPageVo.class, baseClassMPJLambdaWrapper);
|
|
|
@@ -265,34 +269,20 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
|
|
|
for(CalssQuantitativeAssessmentPageVo c: resultPage.getRecords()){
|
|
|
classIdList.add(Long.parseLong(c.getClassId()));
|
|
|
}
|
|
|
+ dto.setClassIdList(classIdList);
|
|
|
|
|
|
- if(classIdList.size() > 0){
|
|
|
+ if(!classIdList.isEmpty()){
|
|
|
//学生个人行为
|
|
|
- List<QuantitativeAssessmentSingleScoreVo> individualBehaviorList = assessmentInspectionMapper.getIndividualBehaviorList(new QuantitativeAssessmentSingleScoreDto(){{
|
|
|
- setClassIdList(classIdList);
|
|
|
- }});
|
|
|
- Map<Long , QuantitativeAssessmentSingleScoreVo> individualBehaviorMap = new HashMap<>();
|
|
|
- for (QuantitativeAssessmentSingleScoreVo q : individualBehaviorList) {
|
|
|
- individualBehaviorMap.put(q.getClassId(), q);
|
|
|
- }
|
|
|
+ dto.setBaseStudentAssessmentCategoryId(1768178717588197377L);
|
|
|
+ Map<Long , QuantitativeAssessmentSingleScoreVo> individualBehaviorMap = getQuantitativeAssessmentSingleScoreMap(dto);
|
|
|
|
|
|
//常规管理
|
|
|
- List<QuantitativeAssessmentSingleScoreVo> conventionalManagementList = assessmentInspectionMapper.getConventionalManagementList(new QuantitativeAssessmentSingleScoreDto(){{
|
|
|
- setClassIdList(classIdList);
|
|
|
- }});
|
|
|
- Map<Long , QuantitativeAssessmentSingleScoreVo> conventionalManagementMap = new HashMap<>();
|
|
|
- for (QuantitativeAssessmentSingleScoreVo q : conventionalManagementList) {
|
|
|
- conventionalManagementMap.put(q.getClassId(), q);
|
|
|
- }
|
|
|
+ dto.setBaseStudentAssessmentCategoryId(1769927649167151105L);
|
|
|
+ Map<Long , QuantitativeAssessmentSingleScoreVo> conventionalManagementMap = getQuantitativeAssessmentSingleScoreMap(dto);
|
|
|
|
|
|
//获奖及荣誉奖彰
|
|
|
- List<QuantitativeAssessmentSingleScoreVo> awardsAndHonorableList = assessmentInspectionMapper.getAwardsAndHonorList(new QuantitativeAssessmentSingleScoreDto(){{
|
|
|
- setClassIdList(classIdList);
|
|
|
- }});
|
|
|
- Map<Long , QuantitativeAssessmentSingleScoreVo> awardsAndHonorableMap = new HashMap<>();
|
|
|
- for (QuantitativeAssessmentSingleScoreVo q : awardsAndHonorableList) {
|
|
|
- awardsAndHonorableMap.put(q.getClassId(), q);
|
|
|
- }
|
|
|
+ dto.setBaseStudentAssessmentCategoryId(1768179375900987394L);
|
|
|
+ Map<Long , QuantitativeAssessmentSingleScoreVo> awardsAndHonorableMap = getQuantitativeAssessmentSingleScoreMap(dto);
|
|
|
|
|
|
//准军事化考核
|
|
|
List<QuantitativeAssessmentSingleScoreVo> paramilitaryList = assessmentInspectionMapper.getParamilitaryList(new QuantitativeAssessmentSingleScoreDto(){{
|
|
|
@@ -307,10 +297,11 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
|
|
|
for(CalssQuantitativeAssessmentPageVo c: resultPage.getRecords()){
|
|
|
Long classId = Long.parseLong(c.getClassId());
|
|
|
if(individualBehaviorMap.get(classId) != null){
|
|
|
- c.setStuPersonalBehaviorSubScore(individualBehaviorMap.get(classId).getScore());
|
|
|
- ScriptEngine engine = new ScriptEngineManager().getEngineByName("js");
|
|
|
+ c.setStuPersonalBehaviorSubScore(individualBehaviorMap.get(classId).getSumScore());
|
|
|
+ c.setStuPersonalBehaviorScore((100 + individualBehaviorMap.get(classId).getSumScore())/100*25);
|
|
|
+ /* ScriptEngine engine = new ScriptEngineManager().getEngineByName("js");
|
|
|
String geRenXingWeiGongShi = "sumSubScore/itemCount";
|
|
|
- /*int totalScore = scoreBySubmitRecordId.get(mobileResultPageVo.getEvaluateSubmitRecordId()).getTotalScore();
|
|
|
+ int totalScore = scoreBySubmitRecordId.get(mobileResultPageVo.getEvaluateSubmitRecordId()).getTotalScore();
|
|
|
int itemCount = scoreBySubmitRecordId.get(mobileResultPageVo.getEvaluateSubmitRecordId()).getItemCount();
|
|
|
double res = 0;
|
|
|
String newStr1 = zonghezhishu.replace("totalScore", ""+totalScore);
|
|
|
@@ -327,11 +318,17 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
|
|
|
}
|
|
|
|
|
|
if(conventionalManagementMap.get(classId) != null){
|
|
|
- c.setClassConventionalManageSubScore(conventionalManagementMap.get(classId).getScore());
|
|
|
+ c.setClassConventionalManageSubScore(conventionalManagementMap.get(classId).getSumScore());
|
|
|
+ c.setClassConventionalManageScore((100 + conventionalManagementMap.get(classId).getSumScore())/100*25);
|
|
|
}
|
|
|
|
|
|
if(awardsAndHonorableMap.get(classId) != null){
|
|
|
- c.setHonorSumScore(awardsAndHonorableMap.get(classId).getScore());
|
|
|
+ c.setHonorSumScore(awardsAndHonorableMap.get(classId).getSumScore());
|
|
|
+ if(awardsAndHonorableMap.get(classId).getSumScore() < 10){
|
|
|
+ c.setHonorScore(awardsAndHonorableMap.get(classId).getSumScore());
|
|
|
+ }else {
|
|
|
+ c.setHonorScore(10D);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -339,6 +336,29 @@ public class BaseStudentAssessmentInspectionServiceImpl extends MPJBaseServiceIm
|
|
|
return resultPage;
|
|
|
}
|
|
|
|
|
|
+ private Map<Long, QuantitativeAssessmentSingleScoreVo> getQuantitativeAssessmentSingleScoreMap(CalssQuantitativeAssessmentPageDto dto){
|
|
|
+ List<QuantitativeAssessmentSingleScoreVo> individualBehaviorList = assessmentInspectionMapper.getAssessmentInspectionByClassIdList(new QuantitativeAssessmentSingleScoreDto(){{
|
|
|
+ setClassIdList(dto.getClassIdList());
|
|
|
+ setBaseStudentAssessmentCategoryId(dto.getBaseStudentAssessmentCategoryId());
|
|
|
+ if(dto.getBaseSemesterId() != null){
|
|
|
+ setBaseSemesterId(dto.getBaseSemesterId());
|
|
|
+ }
|
|
|
+ if(dto.getStartTime() != null){
|
|
|
+ setStartTime(dto.getStartTime());
|
|
|
+ }
|
|
|
+ if(dto.getEndTime() != null){
|
|
|
+ setStartTime(dto.getEndTime());
|
|
|
+ }
|
|
|
+ }});
|
|
|
+ Map<Long , QuantitativeAssessmentSingleScoreVo> individualBehaviorMap = new HashMap<>();
|
|
|
+ for (QuantitativeAssessmentSingleScoreVo q : individualBehaviorList) {
|
|
|
+ if(q.getClassId() != null){
|
|
|
+ individualBehaviorMap.put(q.getClassId(), q);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return individualBehaviorMap;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public Boolean dataHandle(Long id) {
|