183 lines
5.9 KiB
Plaintext
183 lines
5.9 KiB
Plaintext
<%@ page isThreadSafe = "true" %>
|
|
<%@ page buffer="256kb" %>
|
|
<%@ page autoFlush = "true" %>
|
|
<%@ page contentType="application/vnd.ms-excel;charset=UTF-8" %>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%
|
|
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 조회(정전개)";
|
|
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");
|
|
|
|
ArrayList list = (ArrayList)request.getAttribute("LIST");
|
|
ArrayList colNameList = (ArrayList)request.getAttribute("COL_NAME_LIST");
|
|
%>
|
|
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
|
|
<head>
|
|
<meta http-equiv=Content-Type content="text/html; charset=UTF-8">
|
|
<meta name=ProgId content=Excel.Sheet>
|
|
<meta name=Generator content="Microsoft Excel 11">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
|
<script>
|
|
|
|
</script>
|
|
</head>
|
|
<body class="backcolor">
|
|
<form name="form1" action="" method="post">
|
|
<section class="min_part_search">
|
|
<div class="pdm_menu_name">
|
|
<h2>
|
|
<span>BOM 조회(역전개)</span>
|
|
</h2>
|
|
</div>
|
|
<div class="contents_page_basic_margin">
|
|
<div class="pdm_table_wrap">
|
|
<table class="pdm_table_noImg" style="text-align:center;" border="1">
|
|
<colgroup>
|
|
<%
|
|
for(int i = 0 ; i < colNameList.size() ; i++){
|
|
HashMap colNameMap = (HashMap)colNameList.get(i);
|
|
%>
|
|
<col width="40px" />
|
|
<%
|
|
}
|
|
%>
|
|
|
|
<col width="100px" /><!-- Part No -->
|
|
<col width="100px" /><!-- Part Name -->
|
|
<col width="80px" /><!-- UNIT -->
|
|
<col width="70px" /><!-- Qty -->
|
|
<col width="110px" /><!-- EO No -->
|
|
<col width="110px" /><!-- EO Date -->
|
|
<col width="90px" /><!-- Revision -->
|
|
<col width="130px" /><!-- SPEC. -->
|
|
<col width="100px" /><!-- Material -->
|
|
<col width="100px" /><!-- Weight -->
|
|
<col width="100px" /><!-- Part Type -->
|
|
<col width="*" /><!-- 비고 -->
|
|
</colgroup>
|
|
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td colspan="<%=colNameList.size()%>">Level</td>
|
|
<td rowspan="2">Part No.</td>
|
|
<td rowspan="2">Part Name</td>
|
|
<td rowspan="2">UNIT</td>
|
|
<td rowspan="2">Qty</td>
|
|
<td rowspan="2">EO No</td>
|
|
<td rowspan="2">EO Date</td>
|
|
<td rowspan="2">Revision</td>
|
|
<td rowspan="2">SPEC.</td>
|
|
<td rowspan="2">Material</td>
|
|
<td rowspan="2">Weight</td>
|
|
<td rowspan="2">Part Type</td>
|
|
<td rowspan="2">비고</td>
|
|
</tr>
|
|
<tr class="plm_thead">
|
|
<%
|
|
for(int i = 0 ; i < colNameList.size() ; i++){
|
|
HashMap colNameMap = (HashMap)colNameList.get(i);
|
|
|
|
String headerVal = CommonUtils.checkNull(colNameMap.get("COL_HEADER_VAL"));
|
|
|
|
%>
|
|
<td><%=headerVal%></td>
|
|
<%
|
|
}
|
|
%>
|
|
</tr>
|
|
</thead>
|
|
|
|
<%
|
|
for(int i = 0 ; i < list.size() ; i++){
|
|
HashMap partMap = (HashMap)list.get(i);
|
|
|
|
String level = CommonUtils.checkNull(partMap.get("LEV"), "0");
|
|
String lev = CommonUtils.checkNull(partMap.get("LEV"));
|
|
String partNo = CommonUtils.checkNull(partMap.get("PART_NO"));
|
|
String partName = CommonUtils.checkNull(partMap.get("PART_NAME"));
|
|
String unitTitle = CommonUtils.checkNull(partMap.get("UNIT_TITLE"));
|
|
String qty = CommonUtils.checkNull(partMap.get("QTY"));
|
|
String EO_NO = CommonUtils.checkNull(partMap.get("EO_NO"));
|
|
String EO_DATE = CommonUtils.checkNull(partMap.get("EO_DATE"));
|
|
String REVISION = CommonUtils.checkNull(partMap.get("REVISION"));
|
|
String SPEC = CommonUtils.checkNull(partMap.get("SPEC"));
|
|
String MATERIAL = CommonUtils.checkNull(partMap.get("MATERIAL"));
|
|
String WEIGHT = CommonUtils.checkNull(partMap.get("WEIGHT"));
|
|
String PART_TYPE_TITLE = CommonUtils.checkNull(partMap.get("PART_TYPE_TITLE"));
|
|
String REMARK = CommonUtils.checkNull(partMap.get("REMARK"));
|
|
|
|
String background = "";
|
|
|
|
//역전개만해당
|
|
String baseLevel = CommonUtils.checkNull(partMap.get("BASE_LEVEL"));
|
|
|
|
if("1".equals(lev)){
|
|
background = "#fde9d9";
|
|
}else if("2".equals(lev)){
|
|
background = "#daeef3";
|
|
}else if("3".equals(lev)){
|
|
background = "#e4dfec";
|
|
}else if("4".equals(lev)){
|
|
background = "#ebf1de";
|
|
}else if("5".equals(lev)){
|
|
background = "#f2f2f2";
|
|
}else if("6".equals(lev)){
|
|
background = "#f2dcdb";
|
|
}else if("7".equals(lev)){
|
|
background = "#eeece1";
|
|
}else if("8".equals(lev)){
|
|
background = "#dce6f1";
|
|
}else if("9".equals(lev)){
|
|
background = "#FFFFEB";
|
|
}else if("10".equals(lev)){
|
|
background = "#ffffff";
|
|
}
|
|
%>
|
|
<tr>
|
|
|
|
<%
|
|
for(int j = 0 ; j < colNameList.size() ; j++){
|
|
HashMap colNameMap = (HashMap)colNameList.get(j);
|
|
|
|
String headerVal = CommonUtils.checkNull(colNameMap.get("COL_VAL"));
|
|
|
|
String levelColVal = CommonUtils.checkNull(partMap.get(headerVal));
|
|
|
|
%>
|
|
<td><%=levelColVal%></td>
|
|
<%
|
|
}
|
|
%>
|
|
|
|
<td><%=partNo%></td>
|
|
<td><%=partName%></td>
|
|
<td><%=unitTitle%></td>
|
|
<td><%=qty%></td>
|
|
<td><%=EO_NO%></td>
|
|
<td><%=EO_DATE%></td>
|
|
<td><%=REVISION%></td>
|
|
<td><%=SPEC%></td>
|
|
<td><%=MATERIAL%></td>
|
|
<td><%=WEIGHT%></td>
|
|
<td><%=PART_TYPE_TITLE%></td>
|
|
<td><%=REMARK%></td>
|
|
</tr>
|
|
<%
|
|
}
|
|
%>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |