|
@@ -112,6 +112,7 @@ public class ScoreServiceImpl implements ScoreService{
|
|
|
throw new BizException(BizExceptionCode.EXISTS_TEACHER_CLASS);
|
|
throw new BizException(BizExceptionCode.EXISTS_TEACHER_CLASS);
|
|
|
}
|
|
}
|
|
|
scoreMapper.deleteByPrimaryKey(id);
|
|
scoreMapper.deleteByPrimaryKey(id);
|
|
|
|
|
+ scoreMapper.deleteByPrimaryDetailKey(id);
|
|
|
messageLogService.delete(new DocBaseDTO(id, CODE, NAME));
|
|
messageLogService.delete(new DocBaseDTO(id, CODE, NAME));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -313,6 +314,7 @@ public class ScoreServiceImpl implements ScoreService{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
|
|
+ @Transactional
|
|
|
public DocBaseDTO save(ScoreForm data) {
|
|
public DocBaseDTO save(ScoreForm data) {
|
|
|
if (ObjectUtils.isEmpty(data)){
|
|
if (ObjectUtils.isEmpty(data)){
|
|
|
throw new BizException(BizExceptionCode.EMPTY_DATA);
|
|
throw new BizException(BizExceptionCode.EMPTY_DATA);
|
|
@@ -329,7 +331,6 @@ public class ScoreServiceImpl implements ScoreService{
|
|
|
classId = sysClazz.getClazz_id();
|
|
classId = sysClazz.getClazz_id();
|
|
|
gradeId = sysClazz.getGrade_id();
|
|
gradeId = sysClazz.getGrade_id();
|
|
|
}
|
|
}
|
|
|
- Long mId = main.getSi_id();
|
|
|
|
|
if (null == main.getSi_id() || 0 == main.getSi_id()){
|
|
if (null == main.getSi_id() || 0 == main.getSi_id()){
|
|
|
main.setSi_date(new Date());
|
|
main.setSi_date(new Date());
|
|
|
main.setSi_creator(BaseContextHolder.getUserName());
|
|
main.setSi_creator(BaseContextHolder.getUserName());
|
|
@@ -353,11 +354,14 @@ public class ScoreServiceImpl implements ScoreService{
|
|
|
throw new BizException(BizExceptionCode.NONSTU);
|
|
throw new BizException(BizExceptionCode.NONSTU);
|
|
|
}
|
|
}
|
|
|
SysStudent sysStudent = sysStudentMapper.selectByStudent(item.getSd_stu() ,classId,schoolId);
|
|
SysStudent sysStudent = sysStudentMapper.selectByStudent(item.getSd_stu() ,classId,schoolId);
|
|
|
|
|
+ if(sysStudent == null){
|
|
|
|
|
+ throw new BizException(BizExceptionCode.NONSTUS);
|
|
|
|
|
+ }
|
|
|
Long stuId = sysStudent.getStu_id();
|
|
Long stuId = sysStudent.getStu_id();
|
|
|
item.setSd_stuid(stuId);
|
|
item.setSd_stuid(stuId);
|
|
|
}
|
|
}
|
|
|
item.setSchool_id(schoolId);
|
|
item.setSchool_id(schoolId);
|
|
|
- item.setSd_siid(mId);
|
|
|
|
|
|
|
+ item.setSd_siid(main.getSi_id());
|
|
|
//插入从表
|
|
//插入从表
|
|
|
scoreMapper.insertScoreImportDetail(item);
|
|
scoreMapper.insertScoreImportDetail(item);
|
|
|
}
|
|
}
|
|
@@ -382,11 +386,14 @@ public class ScoreServiceImpl implements ScoreService{
|
|
|
throw new BizException(BizExceptionCode.NONSTU);
|
|
throw new BizException(BizExceptionCode.NONSTU);
|
|
|
}
|
|
}
|
|
|
SysStudent sysStudent = sysStudentMapper.selectByStudent(item.getSd_stu() ,classId,schoolId);
|
|
SysStudent sysStudent = sysStudentMapper.selectByStudent(item.getSd_stu() ,classId,schoolId);
|
|
|
|
|
+ if(sysStudent == null){
|
|
|
|
|
+ throw new BizException(BizExceptionCode.NONSTUS);
|
|
|
|
|
+ }
|
|
|
Long stuId = sysStudent.getStu_id();
|
|
Long stuId = sysStudent.getStu_id();
|
|
|
item.setSd_stuid(stuId);
|
|
item.setSd_stuid(stuId);
|
|
|
}
|
|
}
|
|
|
item.setSchool_id(schoolId);
|
|
item.setSchool_id(schoolId);
|
|
|
- item.setSd_siid(mId);
|
|
|
|
|
|
|
+ item.setSd_siid(main.getSi_id());
|
|
|
|
|
|
|
|
if(item.getSd_id() != null && 0 != item.getSd_id()) {
|
|
if(item.getSd_id() != null && 0 != item.getSd_id()) {
|
|
|
updateList.add(item);
|
|
updateList.add(item);
|