95 lines
3.5 KiB
Plaintext
95 lines
3.5 KiB
Plaintext
<%@ 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 = "Qna목록";
|
|
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 qnaList = (ArrayList)request.getAttribute("qnaList");
|
|
|
|
%>
|
|
|
|
<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">
|
|
|
|
<style type="text/css">
|
|
.plm_menu_name {width:100%; background: #e7eaee; border-bottom: 1px solid #d4d4d4;}
|
|
.plm_menu_name h2 {width:97.5%; margin: 0 auto; height:35px; color:000; font-size: 13px; line-height: 35px;}
|
|
.plm_menu_name h2 span {height: 35px; padding-left: 23px; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<h2>QnA</h2>
|
|
<table border="1">
|
|
<tr align="center" bgColor="yellow" style="font-weight:bold;">
|
|
<td rowspan="2">지역</td>
|
|
<td rowspan="2">고객사</td>
|
|
<td rowspan="2">차종</td>
|
|
<td rowspan="2">제목</td>
|
|
<td colspan="2">입찰품목</td>
|
|
<td colspan="2">담당자</td>
|
|
<td rowspan="2">등록일</td>
|
|
</tr>
|
|
<tr align="center" bgColor="yellow" style="font-weight:bold;">
|
|
<td>제품군</td>
|
|
<td>제품</td>
|
|
<td>부서</td>
|
|
<td>성명</td>
|
|
</tr>
|
|
<%
|
|
if(qnaList != null && qnaList.size() > 0){
|
|
for(int i = 0 ; i < qnaList.size() ; i++){
|
|
HashMap map = (HashMap)qnaList.get(i);
|
|
|
|
String foreign_type = CommonUtils.checkNull(map.get("FOREIGN_TYPE"));
|
|
String oem_objid = CommonUtils.checkNull(map.get("OEM_NAME"));
|
|
String car_objid = CommonUtils.checkNull(map.get("CAR_NAME"));
|
|
String title = CommonUtils.checkNull(map.get("TITLE"));
|
|
String prod_group_objid = CommonUtils.checkNull(map.get("PRODUCT_GROUP_NAME"));
|
|
String prod_objid = CommonUtils.checkNull(map.get("PRODUCT_NAME"));
|
|
String user_name = CommonUtils.checkNull(map.get("USER_NAME"));
|
|
String dept_name = CommonUtils.checkNull(map.get("DEPT_NAME"));
|
|
String regdate = CommonUtils.checkNull(map.get("REGDATE"));
|
|
%>
|
|
<tr>
|
|
<td><%=foreign_type%></td>
|
|
<td><%=oem_objid%></td>
|
|
<td><%=car_objid%></td>
|
|
<td><%=title%></td>
|
|
<td><%=prod_group_objid%></td>
|
|
<td><%=prod_objid%></td>
|
|
<td><%=user_name%></td>
|
|
<td><%=dept_name%></td>
|
|
<td><%=regdate%></td>
|
|
</tr>
|
|
<%
|
|
}
|
|
}else{
|
|
%>
|
|
<tr>
|
|
<td align="center" colspan="5">조회된 정보가 없습니다.</td>
|
|
</tr>
|
|
<%
|
|
}
|
|
%>
|
|
</table>
|
|
</form>
|
|
</body>
|
|
</html> |