|
@@ -19,7 +19,9 @@ import com.xjrsoft.module.banding.vo.BandingTaskClassPageVo;
|
|
import com.xjrsoft.module.banding.vo.BandingTaskClassStudentListVo;
|
|
import com.xjrsoft.module.banding.vo.BandingTaskClassStudentListVo;
|
|
import com.xjrsoft.module.banding.vo.BandingTaskClassSureListVo;
|
|
import com.xjrsoft.module.banding.vo.BandingTaskClassSureListVo;
|
|
import com.xjrsoft.module.base.entity.BaseClassroom;
|
|
import com.xjrsoft.module.base.entity.BaseClassroom;
|
|
|
|
+import com.xjrsoft.module.base.entity.BaseMajorSet;
|
|
import com.xjrsoft.module.base.service.IBaseClassroomService;
|
|
import com.xjrsoft.module.base.service.IBaseClassroomService;
|
|
|
|
+import com.xjrsoft.module.base.service.IBaseMajorSetService;
|
|
import com.xjrsoft.module.organization.entity.User;
|
|
import com.xjrsoft.module.organization.entity.User;
|
|
import com.xjrsoft.module.organization.service.IUserService;
|
|
import com.xjrsoft.module.organization.service.IUserService;
|
|
import com.xjrsoft.module.teacher.entity.BaseTeacher;
|
|
import com.xjrsoft.module.teacher.entity.BaseTeacher;
|
|
@@ -48,6 +50,7 @@ public class BandingTaskClassServiceImpl extends MPJBaseServiceImpl<BandingTaskC
|
|
private final BandingTaskClassStudentMapper classStudentMapper;
|
|
private final BandingTaskClassStudentMapper classStudentMapper;
|
|
private final IBaseClassroomService classroomService;
|
|
private final IBaseClassroomService classroomService;
|
|
private final IUserService userService;
|
|
private final IUserService userService;
|
|
|
|
+ private final IBaseMajorSetService majorSetService;
|
|
@Override
|
|
@Override
|
|
public Boolean add(BandingTaskClass bandingTaskClass) {
|
|
public Boolean add(BandingTaskClass bandingTaskClass) {
|
|
bandingTaskClass.setCreateDate(new Date());
|
|
bandingTaskClass.setCreateDate(new Date());
|
|
@@ -132,6 +135,16 @@ public class BandingTaskClassServiceImpl extends MPJBaseServiceImpl<BandingTaskC
|
|
userMap.put(user.getName(), user.getId());
|
|
userMap.put(user.getName(), user.getId());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ List<BaseMajorSet> majorSetList = majorSetService.list(
|
|
|
|
+ new QueryWrapper<BaseMajorSet>().lambda()
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ Map<String, Long> majorSetMap = new HashMap<>();
|
|
|
|
+ for (BaseMajorSet majorSet : majorSetList) {
|
|
|
|
+ majorSetMap.put(majorSet.getName(), majorSet.getId());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
List<BandingTaskClass> classList = new ArrayList<>();
|
|
List<BandingTaskClass> classList = new ArrayList<>();
|
|
Date createDate = new Date();
|
|
Date createDate = new Date();
|
|
for (Map<Integer, Object> taskClass : excelDataList) {
|
|
for (Map<Integer, Object> taskClass : excelDataList) {
|
|
@@ -139,6 +152,7 @@ public class BandingTaskClassServiceImpl extends MPJBaseServiceImpl<BandingTaskC
|
|
setBandingTaskId(bandingTaskId);
|
|
setBandingTaskId(bandingTaskId);
|
|
setCreateDate(createDate);
|
|
setCreateDate(createDate);
|
|
setName(taskClass.get(1).toString());
|
|
setName(taskClass.get(1).toString());
|
|
|
|
+ setMajorSetId(majorSetMap.get(taskClass.get(0).toString().trim()));
|
|
setNumber(Integer.parseInt(taskClass.get(2).toString()));
|
|
setNumber(Integer.parseInt(taskClass.get(2).toString()));
|
|
setClassroomId(classroomMap.get(taskClass.get(4).toString()));
|
|
setClassroomId(classroomMap.get(taskClass.get(4).toString()));
|
|
if(taskClass.get(5) != null){
|
|
if(taskClass.get(5) != null){
|