Commit ced07f9e authored by zhangqingle's avatar zhangqingle

解除excel页数限制

parent 50fb55ca
......@@ -529,7 +529,7 @@ public class BChapterServiceImpl implements BChapterService {
}
}
//TODO 判断 曾经是否学完过 奖励积分
//LZ 判断 曾经是否学完过 奖励积分
if (IsFinishEnum.FINISHED.getCode().equals(lessonPerson.getIsFinish()) && !(IsFinishEnum.LEARNING.getCode().equals(lessonPerson.getEverFinished()))) {
//查询课程信息
if(StringUtils.isNotEmpty(bLesson.getValueGain()) && Long.parseLong(bLesson.getValueGain()) > 0){
......
......@@ -388,7 +388,7 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
if ("2".equals(bLessonPerson.getTrainIsSign())){
throw new ServiceException(ResultServiceEnums.TRAIN_SIGNED);
}
//TODO 判断 曾经是否学完过 奖励积分
//LZ 判断 曾经是否学完过 奖励积分
if ( !("2".equals(bLessonPerson.getTrainIsSign())) && !("1".equals(bLessonPerson.getEverFinished()))){
//查询课程信息
if(StringUtils.isNotEmpty(bLesson.getValueGain()) && Long.parseLong(bLesson.getValueGain()) > 0){
......
......@@ -1153,7 +1153,7 @@ public class BLessonServiceImpl implements BLessonService {
throw new ServiceException(ResultServiceEnums.B_R_SL_STUDENT_NOT_EXISTS);
}
BLesson bLesson = bLessonRepository.selectByPrimaryKey(bLessonPerson.getLessonId());
//TODO 判断 曾经是否学完过 奖励积分
//LZ 判断 曾经是否学完过 奖励积分
if ("2".equals(setTrainIsSignDTO.getTrainIsSign()) && !("2".equals(bLessonPerson.getTrainIsSign())) && !("1".equals(bLessonPerson.getEverFinished())) && bLesson != null) {
//查询课程信息
if(StringUtils.isNotEmpty(bLesson.getValueGain()) && Long.parseLong(bLesson.getValueGain()) > 0){
......@@ -1231,7 +1231,7 @@ public class BLessonServiceImpl implements BLessonService {
person.setDelFlag("0");
person.setIsApply("1");
person.setApplyDate(new Date());
//TODO 判断积分是否够用
//LZ 判断积分是否够用
MyInfoDTO userInfo = sysUserMapper.getNameById(curUser.getUserId());
if (userInfo == null) {
throw new ServiceException(ResultServiceEnums.COMPANY_NOT_EXISTS);
......@@ -1240,7 +1240,7 @@ public class BLessonServiceImpl implements BLessonService {
throw new ServiceException(ResultServiceEnums.VALUE_NOT_ENOUGH);
}
int line = bLessonPersonRepository.updateByPrimaryKeySelective(person);
//TODO 更新用户积分明细表 重进计算积分
//LZ 更新用户积分明细表 重进计算积分
//扣除对应积分 添加用户积分详情 更新用户积分
//增加用户积分详情
if (bLesson.getValueConsume() != null && !"0".equals(bLesson.getValueConsume()) && !curUser.getUserId().equals(bLesson.getLecturerId())) {
......@@ -1262,7 +1262,7 @@ public class BLessonServiceImpl implements BLessonService {
bLessonPersons.add(bLessonPerson);
//插入 用户id 、培训id、指派状态、报名状态、培训状态、报名时间 、通用字段
// int line = bLessonPersonRepository.insert(bLessonPerson);
//TODO 判断积分是否够用
//LZ 判断积分是否够用
MyInfoDTO userInfo = sysUserMapper.getNameById(curUser.getUserId());
if (userInfo == null) {
throw new ServiceException(ResultServiceEnums.COMPANY_NOT_EXISTS);
......@@ -1271,7 +1271,7 @@ public class BLessonServiceImpl implements BLessonService {
throw new ServiceException(ResultServiceEnums.VALUE_NOT_ENOUGH);
}
int line = this.trainInsert("0", bLesson, bLessonPersons);
//TODO 更新用户积分明细表 重进计算积分
//LZ 更新用户积分明细表 重进计算积分
//扣除对应积分 添加用户积分详情 更新用户积分
//增加用户积分详情
if (bLesson.getValueConsume() != null && !"0".equals(bLesson.getValueConsume()) && !curUser.getUserId().equals(bLesson.getLecturerId())) {
......
......@@ -67,7 +67,6 @@ public class FileReadableUtil {
}
private static Integer excelReadable(String path){
Integer pages;
Workbook wb = null;
try {
File excel = new File(path);
......@@ -76,14 +75,14 @@ public class FileReadableUtil {
wb = new HSSFWorkbook(fis);
if("xlsx".equalsIgnoreCase(path.substring(path.lastIndexOf(".")+1)))
wb = new XSSFWorkbook(fis);
pages = wb.getSheetAt(0).getLastRowNum();
wb.getSheetAt(0).getLastRowNum();
} catch (Exception e) {
log.error("文件不可读---"+e);
throw new ServiceException(ResultServiceEnums.FILE_UNREADABLE);
}finally {
FileReadableUtil.closeOtherStream(wb);
}
return pages;
return 1;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment