|
|
@@ -227,17 +227,32 @@ public class CourseSectionServiceImpl extends ServiceImpl<CourseSectionMapper, C
|
|
|
//业务层次,导入每条只有一条业务层次
|
|
|
List<CourseSectionBusinessAddBo> businessList = new ArrayList<>();
|
|
|
CourseSectionBusinessAddBo addBo = new CourseSectionBusinessAddBo();
|
|
|
- Long eduId = findEduId(sectionImport.getEducationType());
|
|
|
+ Long eduId = null;
|
|
|
+ if(Validator.isNotEmpty(sectionImport.getEducationTypeId())){
|
|
|
+ eduId = sectionImport.getEducationTypeId();
|
|
|
+ }else{
|
|
|
+ eduId = findEduId(sectionImport.getEducationType());
|
|
|
+ }
|
|
|
if(!Validator.isNotEmpty(eduId)){
|
|
|
errorLog+="第"+(size - Index)+"条:"+sectionImport.getEducationType()+"-该教育类型不存在。\r\n";
|
|
|
continue;
|
|
|
}
|
|
|
- Long projectId = findProjectId(sectionImport.getProject(),eduId);
|
|
|
+ Long projectId = null;
|
|
|
+ if(Validator.isNotEmpty(sectionImport.getProjectId())){
|
|
|
+ projectId = sectionImport.getProjectId();
|
|
|
+ }else{
|
|
|
+ projectId = findProjectId(sectionImport.getProject(),eduId);
|
|
|
+ }
|
|
|
if(!Validator.isNotEmpty(projectId)){
|
|
|
errorLog+="第"+(size - Index)+"条:"+sectionImport.getProject()+"-该项目类型不存在或者和教育类型不匹配。\r\n";
|
|
|
continue;
|
|
|
}
|
|
|
- Long businessId = findBusinessId(sectionImport.getBusiness(),projectId);
|
|
|
+ Long businessId = null;
|
|
|
+ if(Validator.isNotEmpty(sectionImport.getBusinessId())){
|
|
|
+ businessId = sectionImport.getBusinessId();
|
|
|
+ }else{
|
|
|
+ businessId = findBusinessId(sectionImport.getBusiness(),projectId);
|
|
|
+ }
|
|
|
if(!Validator.isNotEmpty(businessId)){
|
|
|
errorLog+="第"+(size - Index)+"条:"+sectionImport.getBusiness()+"-该业务层次不存在或者和项目类型不匹配。\r\n";
|
|
|
continue;
|