| | |
| | | package com.gkhy.labRiskManage.domain.basic.service.impl; |
| | | |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.gkhy.labRiskManage.api.controller.basic.dto.repDto.OldRiskAssessQueryReqBO; |
| | | import com.gkhy.labRiskManage.api.controller.basic.dto.respDto.OldRiskAssessExportRespDTO; |
| | | import com.gkhy.labRiskManage.api.controller.basic.dto.respDto.OldRiskAssessQueryRespDTO; |
| | |
| | | |
| | | @Transactional |
| | | @Override |
| | | public int importOldRiskAssess(Long currentUserId, MultipartFile file) { |
| | | public int importOldRiskAssess(Long currentUserId, MultipartFile file) throws IOException { |
| | | |
| | | if (currentUserId < 0){ |
| | | throw new BusinessException(this.getClass(), ResultCode.BUSINESS_ERROR_NOT_ALLOWED.getCode() ,"当前用户无效,请重新登陆"); |
| | | } |
| | | |
| | | |
| | | // List<OldRiskAssessImport> objects = EasyExcel.read(file.getInputStream()).head(OldRiskAssessImport.class).sheet().headRowNumber(1).doReadSync(); |
| | | |
| | | |
| | | |
| | | |
| | | //根据路径获取这个操作excel的实例 |
| | | HSSFWorkbook wb = null; |
| | | List<OldRiskAssess> list = new ArrayList<>(); |