抽象类实例化改写之后,如何DEBUG执行以下
ExcelImport 是抽象类的方法public ExcelImport(InputStream is,boolean isExcel2007) {
if (null == is) {
throw new RuntimeException("没有指定导入的excel文件流!");
}
this.is = is;
this.isExcel2007 = isExcel2007;
}
----------------------------------------------------------------------------------
ExcelImport<ApplicationFormExcelImportModel> excelImport = new ExcelImport<ApplicationFormExcelImportModel>(inputStream,
isExcel2007) {
public boolean importData(
List<ApplicationFormExcelImportModel> source) {
Map<Integer, ApplicationFormExcelImportModel> succ = new HashMap<Integer, ApplicationFormExcelImportModel>();
if (source != null) {
excelImportResult.setTotal(source.size());
}
// 数据校验: 课程编码校验
checkApplicationFormImportModel(source, succ, fail);
if (succ.size() > 0) {
// 判断入库类型:新增/修改/退出
Map<Integer, String> result = cdvService.getUpdateType(succ, operationType,client);
// 最终入库的集合
Map<Integer,CourseDevApplicant> cmiList = new HashMap<Integer, CourseDevApplicant>();
for (Entry<Integer, ApplicationFormExcelImportModel> entry : succ
.entrySet()) {
ApplicationFormExcelImportModel courseInfo = entry
.getValue();
CourseDevApplicant cdev = new CourseDevApplicant();
cdev.setCourseType(courseInfo.getCourseType() + "");
cdev.setCourseName(courseInfo.getCourseName());
cdev.setSelectBook(courseInfo.getSelectBook());
cdev.setStartTime(DateUtil.parseDate(courseInfo
.getStartTime()));
cdev.setClassTeacher(courseInfo.getClassTeacher());
cdev.setSchoolLevel(courseInfo.getSchoolLevel() + "");
cdev.setTeachStyle(courseInfo.getTeachStyle() + "");
cdev.setSchoolObject(courseInfo.getSchoolObject());
cdev.setWeekHoursNum(courseInfo.getWeekHoursNum());
cdev.setTotalHoursNum(courseInfo.getTotalHoursNum());
cdev.setCheckStyle(courseInfo.getCheckStyle());
cdev.setTeacherScore(Integer.parseInt(courseInfo
.getTeacherScore()));
cdev.setStudentScore(Integer.parseInt(courseInfo
.getStudentScore()));
cdev.setCourseAIM(courseInfo.getCourseAIM());
cdev.setCourseContent(courseInfo.getCourseContent());
cdev.setCourseImpl(courseInfo.getCourseImpl());
cdev.setCourseMeaning(courseInfo.getCourseMeaning());
cdev.setRemark(courseInfo.getRemark());
//开发费用
BigDecimal developDecimal = new BigDecimal(courseInfo.getDevelop());
BigDecimal develop = developDecimal.setScale(4);
cdev.setDevelop(develop);
cdev.setApplicantName(client.getYhbm());
cdev.setApplicantNum(client.getYhid());
cdev.setUnitTwo(client.getUnit_two_code());
cdev.setUnitTwo(client.getUnit_two_name());
cdev.setUnitThree(client.getUnit_three_code());
cdev.setUnitThreeName(client.getUnit_three_name());
cdev.setDelTime(null);
cdev.setAviFlag("0");// 0为待审核
cmiList.put(entry.getKey(), cdev);
}
cdvService.batchSaveOrUpdate(cmiList, result, client);
}
return true;
}
DEBUG之后只能走到ExcelImport<ApplicationFormExcelImportModel> excelImport = new ExcelImport<ApplicationFormExcelImportModel>(inputStream,
isExcel2007) 就不往下走了,该怎么办 抽象类 实例化
补充:Java , Java相关