|
@@ -22,6 +22,7 @@ import com.xjrsoft.module.banding.entity.BandingTaskClass;
|
|
import com.xjrsoft.module.banding.entity.BandingTaskClassStudent;
|
|
import com.xjrsoft.module.banding.entity.BandingTaskClassStudent;
|
|
import com.xjrsoft.module.banding.service.IBandingTaskClassService;
|
|
import com.xjrsoft.module.banding.service.IBandingTaskClassService;
|
|
import com.xjrsoft.module.banding.service.IBandingTaskClassStudentService;
|
|
import com.xjrsoft.module.banding.service.IBandingTaskClassStudentService;
|
|
|
|
+import com.xjrsoft.module.banding.service.IBandingTaskService;
|
|
import com.xjrsoft.module.banding.vo.BandingTaskClassExcelVo;
|
|
import com.xjrsoft.module.banding.vo.BandingTaskClassExcelVo;
|
|
import com.xjrsoft.module.banding.vo.BandingTaskClassPageVo;
|
|
import com.xjrsoft.module.banding.vo.BandingTaskClassPageVo;
|
|
import com.xjrsoft.module.banding.vo.BandingTaskClassStudentListVo;
|
|
import com.xjrsoft.module.banding.vo.BandingTaskClassStudentListVo;
|
|
@@ -62,7 +63,7 @@ import java.util.Map;
|
|
@AllArgsConstructor
|
|
@AllArgsConstructor
|
|
public class BandingTaskClassController {
|
|
public class BandingTaskClassController {
|
|
|
|
|
|
-
|
|
|
|
|
|
+ private final IBandingTaskService taskService;
|
|
private final IBandingTaskClassService bandingTaskClassService;
|
|
private final IBandingTaskClassService bandingTaskClassService;
|
|
private final IBandingTaskClassStudentService classStudentService;
|
|
private final IBandingTaskClassStudentService classStudentService;
|
|
|
|
|
|
@@ -109,7 +110,9 @@ public class BandingTaskClassController {
|
|
public RT<Boolean> add(@Valid @RequestBody List<AddBandingTaskClassDto> dtoList){
|
|
public RT<Boolean> add(@Valid @RequestBody List<AddBandingTaskClassDto> dtoList){
|
|
List<BandingTaskClass> dataList = new ArrayList<>();
|
|
List<BandingTaskClass> dataList = new ArrayList<>();
|
|
List<String> errorList = new ArrayList<>();
|
|
List<String> errorList = new ArrayList<>();
|
|
|
|
+
|
|
for (AddBandingTaskClassDto dto : dtoList) {
|
|
for (AddBandingTaskClassDto dto : dtoList) {
|
|
|
|
+ BandingTask task = taskService.getById(dto.getBandingTaskId());
|
|
if(dto.getSortCode() != null){
|
|
if(dto.getSortCode() != null){
|
|
List<BandingTaskClass> list = bandingTaskClassService.list(
|
|
List<BandingTaskClass> list = bandingTaskClassService.list(
|
|
new QueryWrapper<BandingTaskClass>().lambda()
|
|
new QueryWrapper<BandingTaskClass>().lambda()
|
|
@@ -121,8 +124,10 @@ public class BandingTaskClassController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- BandingTaskClass bandingTask = BeanUtil.toBean(dto, BandingTaskClass.class);
|
|
|
|
- bandingTask.setCreateDate(new Date());
|
|
|
|
|
|
+ BandingTaskClass bandingTaskClass = BeanUtil.toBean(dto, BandingTaskClass.class);
|
|
|
|
+ bandingTaskClass.setCreateDate(new Date());
|
|
|
|
+ bandingTaskClass.setStatus(task.getStatus());
|
|
|
|
+ dataList.add(bandingTaskClass);
|
|
}
|
|
}
|
|
if(!errorList.isEmpty()){
|
|
if(!errorList.isEmpty()){
|
|
return RT.error(errorList.toString().replace("[", "").replace("]", "") + ",分班排序重复");
|
|
return RT.error(errorList.toString().replace("[", "").replace("]", "") + ",分班排序重复");
|