diff --git a/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java b/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java index 7b563434..91fa2463 100644 --- a/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java +++ b/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java @@ -95,6 +95,17 @@ public class Rent04Controller extends ApplicationController { public ModelAndView upload(MultipartFile file) throws InterruptedException, IOException { ModelAndView mav = new ModelAndView("jsonView"); + RentQuery entQuery = new RentQuery(); + entQuery.setUserId(currentUser().getId()); + List entList = userRentEntMpngMapper.selectUserRentEntMpngList(entQuery); + //사용자 기업ID 목록 + String[] entIds = entList.stream().map(i -> i.string("ENT_ID")).toList().toArray(new String[entList.size()]); + //사용자 기업등록번호 목록 + List entRegNos = entList.stream().map(i -> i.string("ENT_REG_NO")).toList(); + //사용자 기업명 목록 + List entNms = entList.stream().map(i -> i.string("ENT_NM")).toList(); + + byte[] bytesOfFile = file.getBytes(); InputStream in = new ByteArrayInputStream(bytesOfFile); XSSFWorkbook workbook = new XSSFWorkbook(in); @@ -102,7 +113,6 @@ public class Rent04Controller extends ApplicationController { try { - in.close(); int rowNo = 0; @@ -161,15 +171,6 @@ public class Rent04Controller extends ApplicationController { && !resultRow.string("A").equals("") //빈셀이 아닐것 // && // TODO : 과태료구분이 시스템에서사용하는 과태료일것 ) { - RentQuery entQuery = new RentQuery(); - entQuery.setUserId(currentUser().getId()); - List entList = userRentEntMpngMapper.selectUserRentEntMpngList(entQuery); - //사용자 기업ID 목록 - String[] entIds = entList.stream().map(i -> i.string("ENT_ID")).toList().toArray(new String[entList.size()]); - //사용자 기업등록번호 목록 - List entRegNos = entList.stream().map(i -> i.string("ENT_REG_NO")).toList(); - //사용자 기업명 목록 - List entNms = entList.stream().map(i -> i.string("ENT_NM")).toList(); String epaynoColumn = resultRow.string("B"); String crdnDtColumn = resultRow.string("G");