From 99c69125d75534ba7ea70e678c086bbccf4472fc Mon Sep 17 00:00:00 2001 From: leebj Date: Thu, 31 Oct 2024 15:40:52 +0900 Subject: [PATCH] =?UTF-8?q?=EC=86=8C=EC=8A=A4=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/rent/web/Rent04Controller.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) 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");