|
@@ -74,6 +74,8 @@ import com.xjrsoft.module.system.entity.DictionaryItem;
|
|
|
import com.xjrsoft.module.system.mapper.DictionarydetailMapper;
|
|
|
import com.xjrsoft.module.system.mapper.DictionaryitemMapper;
|
|
|
import com.xjrsoft.module.system.service.IAreaService;
|
|
|
+import com.xjrsoft.module.system.service.IDictionarydetailService;
|
|
|
+import com.xjrsoft.module.teacher.entity.BaseTeacher;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
@@ -135,6 +137,7 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
|
|
|
private final IBaseClassService baseClassService;
|
|
|
|
|
|
private final IBaseGradeService baseGradeService;
|
|
|
+ private IDictionarydetailService dictionarydetailService;
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@@ -147,8 +150,29 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
|
|
|
baseStudentUser.setPassword(BCrypt.hashpw(propertiesConfig.getDefaultPassword(), BCrypt.gensalt()));
|
|
|
studentbaseManagerBaseStudentUserMapper.insert(baseStudentUser);
|
|
|
for (BaseStudent baseStudent : baseStudentUser.getBaseStudentList()) {
|
|
|
+
|
|
|
baseStudent.setUserId(baseStudentUser.getId());
|
|
|
+
|
|
|
+ BaseStudentSchoolRoll baseStudentSchoolRoll=baseStudentUser.getBaseStudentSchoolRollList().get(0);
|
|
|
+
|
|
|
+ if (StrUtil.isNotBlank(baseStudentSchoolRoll.getArchivesStatus())) {
|
|
|
+ baseStudent.setIsNormal(1);
|
|
|
+ } else {
|
|
|
+ DictionaryDetail dictionaryDetail = dictionarydetailService.getOne(Wrappers.<DictionaryDetail>query()
|
|
|
+ .lambda()
|
|
|
+ .eq(DictionaryDetail::getCode, baseStudentSchoolRoll.getArchivesStatus())
|
|
|
+ .inSql(DictionaryDetail::getItemId,"SELECT id from xjr_dictionary_item where code='archives_status'"));
|
|
|
+ if (dictionaryDetail != null) {
|
|
|
+ if (dictionaryDetail.getExtendField1().equals("0")) {
|
|
|
+ baseStudent.setIsNormal(0);
|
|
|
+ } else {
|
|
|
+ baseStudent.setIsNormal(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
baseStudentService.save(baseStudent);
|
|
|
+
|
|
|
}
|
|
|
for (BaseStudentContact baseStudentContact : baseStudentUser.getBaseStudentContactList()) {
|
|
|
baseStudentContact.setUserId(baseStudentUser.getId());
|
|
@@ -243,6 +267,25 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
|
|
|
List<Long> baseStudentRemoveIds = baseStudentIds.stream().filter(item -> !baseStudentOldIds.contains(item)).collect(Collectors.toList());
|
|
|
|
|
|
for (BaseStudent baseStudent : baseStudentUser.getBaseStudentList()) {
|
|
|
+
|
|
|
+ BaseStudentSchoolRoll baseStudentSchoolRoll=baseStudentUser.getBaseStudentSchoolRollList().get(0);
|
|
|
+
|
|
|
+ if (StrUtil.isNotBlank(baseStudentSchoolRoll.getArchivesStatus())) {
|
|
|
+ baseStudent.setIsNormal(1);
|
|
|
+ } else {
|
|
|
+ DictionaryDetail dictionaryDetail = dictionarydetailService.getOne(Wrappers.<DictionaryDetail>query()
|
|
|
+ .lambda()
|
|
|
+ .eq(DictionaryDetail::getCode, baseStudentSchoolRoll.getArchivesStatus())
|
|
|
+ .inSql(DictionaryDetail::getItemId,"SELECT id from xjr_dictionary_item where code='archives_status'"));
|
|
|
+ if (dictionaryDetail != null) {
|
|
|
+ if (dictionaryDetail.getExtendField1().equals("0")) {
|
|
|
+ baseStudent.setIsNormal(0);
|
|
|
+ } else {
|
|
|
+ baseStudent.setIsNormal(1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//如果不等于空则修改
|
|
|
if (baseStudent.getId() != null) {
|
|
|
baseStudentService.updateById(baseStudent);
|
|
@@ -1136,4 +1179,5 @@ public class StudentManagerServiceImpl extends MPJBaseServiceImpl<BaseStudentUse
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
+
|
|
|
}
|