原gitlab中LaboratoryRiskManageServer
heheng
9 hours ago 2072003ebd2e620f3ab9c22a87a6515684b0cb8d
src/main/java/com/gkhy/labRiskManage/domain/basic/service/impl/OldRiskAssessServiceImpl.java
@@ -1,5 +1,6 @@
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;
@@ -213,11 +214,18 @@
    @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<>();