<%@ page import="com.pms.common.utils.*"%> <%@ page import="java.util.*" %> <%@ page isThreadSafe = "true" %> <%@ page buffer="256kb" %> <%@ page autoFlush = "true" %> <%@ page contentType="application/vnd.ms-excel;charset=UTF-8" %> <% java.text.SimpleDateFormat frm= new java.text.SimpleDateFormat ("yyyy_MM_dd_HH_mm"); Calendar cal = Calendar.getInstance(); String todayKor = frm.format(cal.getTime()); String excelName = "BOM_EXCEL_DOWNLOAD"; String encodeName = excelName+todayKor+".xls"; String fileName = java.net.URLEncoder.encode(encodeName,"UTF-8"); response.setHeader("Content-Disposition", "attachment;filename="+fileName+""); response.setHeader("Content-Description", "JSP Generated Data"); response.setContentType("application/vnd.ms-excel"); ArrayList TREE_LIST = new ArrayList(); TREE_LIST = (ArrayList)request.getAttribute("partList"); %>

구매 BOM Excel Download


<% for(int i=0; i< TREE_LIST.size(); i++){ Map treeMap = new HashMap(); treeMap = (Map)TREE_LIST.get(i); System.out.println("treeMap:"+treeMap); String level = CommonUtils.checkNull(treeMap.get("LEV")); String partNo = CommonUtils.checkNull(treeMap.get("PART_NO")); String partName = CommonUtils.checkNull(treeMap.get("PART_NAME")); String qty = CommonUtils.checkNull(treeMap.get("QTY")); String spec = CommonUtils.checkNull(treeMap.get("SPEC")); String postProcessing = CommonUtils.checkNull(treeMap.get("POST_PROCESSING")); String maker = CommonUtils.checkNull(treeMap.get("MAKER")); String partType = CommonUtils.checkNull(treeMap.get("PART_TYPE_NAME")); String supplyName = CommonUtils.checkNull(treeMap.get("SUPPLY_NAME")); String supplyPrice = CommonUtils.checkNull(treeMap.get("PRICE")); String supply1Name = CommonUtils.checkNull(treeMap.get("SUPPLY_NAME1")); String supply1Price = CommonUtils.checkNull(treeMap.get("PRICE1")); String supply2Name = CommonUtils.checkNull(treeMap.get("SUPPLY_NAME2")); String supply2Price = CommonUtils.checkNull(treeMap.get("PRICE2")); String supply3Name = CommonUtils.checkNull(treeMap.get("SUPPLY_NAME3")); String supply3Price = CommonUtils.checkNull(treeMap.get("PRICE3")); String supply4Name = CommonUtils.checkNull(treeMap.get("SUPPLY_NAME4")); String supply4Price = CommonUtils.checkNull(treeMap.get("PRICE4")); String PRICE_SUM = CommonUtils.checkNull(treeMap.get("PRICE_SUM")); String remark = CommonUtils.checkNull(treeMap.get("REMARK")); %> <% } %>
Level 품번 품명 수량 사양 후처리 MAKER PART 구분 공급업체 단가 레이져업체 단가 용접업체 단가 가공업체 단가 후처리 단가 단가합 REMARK
<%=level %> <%=partNo %> <%=partName %> <%=qty %> <%=spec %> <%=postProcessing%> <%=maker %> <%=partType %> <%=supplyName %> <%=supplyPrice%> <%=supply1Name %> <%=supply1Price%> <%=supply2Name %> <%=supply2Price%> <%=supply3Name %> <%=supply3Price%> <%=supply4Name %> <%=supply4Price%> <%=PRICE_SUM%> <%=remark%>