|
@@ -40,10 +40,7 @@ import com.xjrsoft.module.teacher.entity.XjrUser;
|
|
|
import com.xjrsoft.module.textbook.dto.*;
|
|
import com.xjrsoft.module.textbook.dto.*;
|
|
|
import com.xjrsoft.module.textbook.entity.*;
|
|
import com.xjrsoft.module.textbook.entity.*;
|
|
|
import com.xjrsoft.module.textbook.mapper.*;
|
|
import com.xjrsoft.module.textbook.mapper.*;
|
|
|
-import com.xjrsoft.module.textbook.service.ITextbookService;
|
|
|
|
|
-import com.xjrsoft.module.textbook.service.ITextbookWarehouseRecordService;
|
|
|
|
|
-import com.xjrsoft.module.textbook.service.IWfExerciseBookService;
|
|
|
|
|
-import com.xjrsoft.module.textbook.service.IWfTextbookSubscriptionService;
|
|
|
|
|
|
|
+import com.xjrsoft.module.textbook.service.*;
|
|
|
import com.xjrsoft.module.textbook.vo.*;
|
|
import com.xjrsoft.module.textbook.vo.*;
|
|
|
import lombok.AllArgsConstructor;
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.apache.poi.ss.usermodel.BorderStyle;
|
|
import org.apache.poi.ss.usermodel.BorderStyle;
|
|
@@ -96,6 +93,7 @@ public class TextbookServiceImpl extends MPJBaseServiceImpl<TextbookMapper, Text
|
|
|
|
|
|
|
|
private final BaseSemesterMapper baseSemesterMapper;
|
|
private final BaseSemesterMapper baseSemesterMapper;
|
|
|
|
|
|
|
|
|
|
+ private final ITextbookCoreAttributeService textbookCoreAttributeService;
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@@ -836,7 +834,6 @@ public class TextbookServiceImpl extends MPJBaseServiceImpl<TextbookMapper, Text
|
|
|
TextbookCoreAttribute textbookCoreAttribute = new TextbookCoreAttribute();
|
|
TextbookCoreAttribute textbookCoreAttribute = new TextbookCoreAttribute();
|
|
|
BeanUtils.copyProperties(textbookImportDto, textbookCoreAttribute);
|
|
BeanUtils.copyProperties(textbookImportDto, textbookCoreAttribute);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
Textbook textbook = new Textbook();
|
|
Textbook textbook = new Textbook();
|
|
|
BeanUtils.copyProperties(textbookImportDto, textbook);
|
|
BeanUtils.copyProperties(textbookImportDto, textbook);
|
|
|
|
|
|
|
@@ -902,6 +899,8 @@ public class TextbookServiceImpl extends MPJBaseServiceImpl<TextbookMapper, Text
|
|
|
|
|
|
|
|
Textbook oldTextbook = this.getOne(textbookLambdaQueryWrapper);
|
|
Textbook oldTextbook = this.getOne(textbookLambdaQueryWrapper);
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 已经存在,更新数据
|
|
// 已经存在,更新数据
|
|
|
if (oldTextbook != null) {
|
|
if (oldTextbook != null) {
|
|
|
// 更新教材数据
|
|
// 更新教材数据
|
|
@@ -923,6 +922,9 @@ public class TextbookServiceImpl extends MPJBaseServiceImpl<TextbookMapper, Text
|
|
|
}});
|
|
}});
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ textbookCoreAttributeService.save(textbookCoreAttribute);
|
|
|
|
|
+
|
|
|
|
|
+ textbook.setTextbookCoreAttributeId(textbookCoreAttribute.getId());
|
|
|
// 插入教材数据
|
|
// 插入教材数据
|
|
|
textbookTextbookMapper.insert(textbook);
|
|
textbookTextbookMapper.insert(textbook);
|
|
|
|
|
|