Files
wace_plm/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderFormPopup_newDOWN_back.jsp
chpark da06c4684c Initial commit: WACE PLM with database initialization features
- Add Docker Compose configurations for dev, prod, and standalone environments
- Add database initialization scripts (init-db.sh, init-db-docker.sh)
- Add enhanced start-docker-linux.sh with DB init support
- Add comprehensive database initialization guide
- Support for automatic dbexport.pgsql import on first run
- Include safety checks for production environment
2025-08-29 15:46:08 +09:00

250 lines
11 KiB
Plaintext

<%--
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
--%>
<%@ page contentType="application/vnd.ms-excel;charset=UTF-8" %>
<%@ page isThreadSafe = "true" %>
<%@ page buffer="256kb" %>
<%@ page autoFlush = "true" %>
<%@ page import="com.pms.common.utils.*"%>
<%@ page import="java.util.*" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<% pageContext.setAttribute("replaceChar","\n"); %>
<%
java.text.SimpleDateFormat frm= new java.text.SimpleDateFormat ("yyyy_MM_dd_HH_mm");
Calendar cal = Calendar.getInstance();
String todayKor = frm.format(cal.getTime());
Map masterInfo = (Map)request.getAttribute("info");
ArrayList detailList = (ArrayList)request.getAttribute("detailList");
ArrayList apprList = (ArrayList)request.getAttribute("apprList");
String excelName = CommonUtils.checkNull((String)masterInfo.get("PURCHASE_ORDER_NO"));
/* String encodeName = excelName+todayKor+".xls"; */
String encodeName = "발주서_"+excelName+".xls";
String fileName = java.net.URLEncoder.encode(encodeName,"UTF-8");
String sty_td_h = "style=\"text-align:center; background-color:#D5D5D5;\"";
response.setHeader("Content-Disposition", "attachment;filename="+fileName+"");
response.setHeader("Content-Description", "JSP Generated Data");
String[] arrAppr = {"","","",""}; //결재라인 4
for(int i = 0 ; i < apprList.size() ; i++){
HashMap map = (HashMap)apprList.get(i);
if(i==0){
arrAppr[0] = CommonUtils.checkNull(map.get("WRITER"))+"<br>"+CommonUtils.checkNull(map.get("REGDATE"));
}
if(i<4){
arrAppr[i+1] = CommonUtils.checkNull(map.get("TARGET_USER_NAME"))+"<br>"+CommonUtils.checkNull(map.get("PROC_DATE"));
}
}
%>
<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">
<%--
<!DOCTYPE html>
<html>
--%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<table style="width:1310px" border="2" cellpadding="1" cellspacing="1">
<colgroup>
<col style="width: 30px; height:23px"></col><!-- 발주처 -->
<col style="width: 50px; height:23px"></col>
<col style="width:100px; height:23px"></col>
<col style="width: 50px; height:23px"></col>
<col style="width:100px; height:23px"></col>
<col style="width: 50px; height:23px"></col>
<col style="width: 50px; height:23px"></col>
<col style="width: 50px; height:23px"></col>
<col style="width: 50px; height:23px"></col>
<col style="width: 50px; height:23px"></col>
<col style="width: 50px; height:23px"></col>
<col style="width: 50px; height:23px"></col><!-- 공급처 -->
<col style="width: 50px; height:23px"></col>
<col style="width: 90px; height:23px"></col>
<col style="width: 90px; height:23px"></col>
<col style="width: 80px; height:23px"></col>
<col style="width:100px; height:23px"></col>
<col style="width: 90px; height:23px"></col>
<col style="width: 120px; height:23px"></col>
<col style="width: 90px; height:23px"></col>
</colgroup>
<tr>
<td colspan="3">발주번호 </td>
<td colspan="7"><%=CommonUtils.checkNull((String)masterInfo.get("PURCHASE_ORDER_NO"))%></td>
<td colspan="3">프로젝트번호</td>
<td colspan="7"><%=CommonUtils.checkNull((String)masterInfo.get("PROJECT_NO"))%></td> <!-- CONTRACT_MGNT_NAME -->
</tr>
<tr>
<td colspan="3">발주부품 </td>
<td colspan="7"><%=CommonUtils.checkNull((String)masterInfo.get("TYPE_NAME"))%></td>
<td colspan="3">유닛명 </td>
<td colspan="7"><%=CommonUtils.checkNull((String)masterInfo.get("UNIT_NAME"))%></td>
</tr>
<tr>
<td colspan="20" style="text-align: center; height: 50px; font-size:15px; font-weight:700;">
발주서
<br style="mso-data-placement: same-cell;">
(Purchase Order)
</td>
</tr>
<tr>
<td <%=sty_td_h%> rowspan="6" colspan="2">발주처</td>
<td <%=sty_td_h%>>회사명</td>
<td colspan="7">우성에스이주식회사</td>
<td <%=sty_td_h%> rowspan="6" colspan="2">공급처</td>
<td <%=sty_td_h%>>회사명</td>
<td colspan="7"><%=CommonUtils.checkNull((String)masterInfo.get("PARTNER_NAME"))%></td>
</tr>
<tr>
<td <%=sty_td_h%>>사업자번호</td>
<td colspan="7">514-81-95155</td>
<td <%=sty_td_h%>>사업자번호</td>
<td colspan="7"><%=CommonUtils.checkNull((String)masterInfo.get("SUPPLY_BUS_NO"))%></td>
</tr>
<tr>
<td <%=sty_td_h%>>담당자</td>
<td colspan="2"><%=CommonUtils.checkNull((String)masterInfo.get("SALES_MNG_USER_NAME"))%></td>
<td <%=sty_td_h%>>HP</td>
<td colspan="4">053-588-5711</td>
<td <%=sty_td_h%>>담당자</td>
<td colspan="2"><%=CommonUtils.checkNull((String)masterInfo.get("SUPPLY_USER_NAME"))%></td>
<td <%=sty_td_h%>>HP</td>
<td colspan="4"><%=CommonUtils.checkNull((String)masterInfo.get("SUPPLY_USER_HP"))%></td>
</tr>
<tr>
<td <%=sty_td_h%>>전화</td>
<td colspan="2">053-585-5712</td>
<td <%=sty_td_h%>>FAX</td>
<td colspan="4"></td>
<td <%=sty_td_h%>>전화</td>
<td colspan="2"><%=CommonUtils.checkNull((String)masterInfo.get("SUPPLY_USER_TEL"))%></td>
<td <%=sty_td_h%>>FAX</td>
<td colspan="4"><%=CommonUtils.checkNull((String)masterInfo.get("SUPPLY_USER_FAX"))%></td>
</tr>
<tr>
<td <%=sty_td_h%>>E-MAIL</td>
<td colspan="7">woosung@wsse.co.kr</td>
<td <%=sty_td_h%>>E-MAIL</td>
<td colspan="7"><%=CommonUtils.checkNull((String)masterInfo.get("SUPPLY_USER_EMAIL"))%></td>
</tr>
<tr>
<td <%=sty_td_h%>>주소</td>
<td colspan="7">대구광역시 달성군 다사읍 세천로3길 28</td>
<td <%=sty_td_h%>>주소</td>
<td colspan="7"><%=CommonUtils.checkNull((String)masterInfo.get("SUPPLY_ADDR"))%></td>
</tr>
<tr>
<td colspan="20" style="text-align: center; height: 50px;">
아래의 자재를 발주하오니 기일 내 필히 납품하여 주시기 바랍니다.
</td>
</tr>
<tr>
<td colspan="3" <%=sty_td_h%>>발주구분 </td>
<td colspan="2"><%=CommonUtils.checkNull((String)masterInfo.get("ORDER_TYPE_CD_NAME"))%></td>
<td colspan="3" <%=sty_td_h%>>제 목 </td>
<td colspan="12"><%=CommonUtils.checkNull((String)masterInfo.get("TITLE"))%></td>
</tr>
<tr>
<td colspan="3" <%=sty_td_h%>>납품장소 </td>
<td colspan="2"><%=CommonUtils.checkNull((String)masterInfo.get("DELIVERY_PLACE_NAME"))%></td>
<td colspan="3" <%=sty_td_h%>>검수방법 </td>
<td colspan="3"><%=CommonUtils.checkNull((String)masterInfo.get("INSPECT_METHOD_NAME"))%></td>
<td colspan="2" <%=sty_td_h%>>결제조건 </td>
<td colspan="2"><%=CommonUtils.checkNull((String)masterInfo.get("PAYMENT_TERMS_NAME"))%></td>
<td colspan="2" <%=sty_td_h%>>입고요청일 </td>
<td colspan="3" style="text-align:center;"><%=CommonUtils.checkNull((String)masterInfo.get("DELIVERY_DATE"))%></td>
</tr>
<tr>
<td colspan="3" <%=sty_td_h%>>금액합계 </td>
<td colspan="12"><%=CommonUtils.checkNull((String)masterInfo.get("TOTAL_PRICE_TXT"))%></td>
<td colspan="1" <%=sty_td_h%>>부가세 </td>
<td colspan="4"><%=CommonUtils.checkNull((String)masterInfo.get("VAT_METHOD_NAME"))%></td>
</tr>
<tr></tr>
<%-- ====================================================== --%>
<tr style="height: 26px;">
<td colspan="1" <%=sty_td_h%>>NO.</td>
<td colspan="3" <%=sty_td_h%>>품명</td>
<td colspan="3" <%=sty_td_h%>>품번</td>
<td colspan="3" <%=sty_td_h%>>규격</td>
<td colspan="2" <%=sty_td_h%>>Maker</td>
<td colspan="1" <%=sty_td_h%>>단위</td>
<td colspan="1" <%=sty_td_h%>>수량</td>
<td colspan="1" <%=sty_td_h%>>공급단가</td>
<td colspan="1" <%=sty_td_h%>>레이져단가</td>
<td colspan="1" <%=sty_td_h%>>용접단가</td>
<td colspan="1" <%=sty_td_h%>>가공단가</td>
<td colspan="1" <%=sty_td_h%>>공급가</td>
<td colspan="1" <%=sty_td_h%>>부가세</td>
</tr>
<%
for(int i = 0 ; i < detailList.size() ; i++){
HashMap map = (HashMap)detailList.get(i);
%>
<tr>
<td colspan="1" style="text-align:center;"><%=(i+1)%></td>
<td colspan="3" style="text-align: left;"><%=CommonUtils.checkNull(map.get("PART_NAME" ))%></td>
<td colspan="3" style="text-align: left;"><%=CommonUtils.checkNull(map.get("PART_NO" ))%></td>
<td colspan="3" style="text-align: left;"><%=CommonUtils.checkNull(map.get("SPEC" ))%></td>
<td colspan="2" style="text-align: left;"><%=CommonUtils.checkNull(map.get("MAKER" ))%></td>
<td colspan="1" style="text-align:center;"><%=CommonUtils.checkNull(map.get("UNIT_NAME" ))%></td>
<td colspan="1" style="text-align: right;"><%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("ORDER_QTY" )))%></td>
<td colspan="1" style="text-align: right;"><%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("PARTNER_PRICE" )))%></td>
<td colspan="1" style="text-align: right;"><%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("PRICE1" )))%></td>
<td colspan="1" style="text-align: right;"><%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("PRICE2" )))%></td>
<td colspan="1" style="text-align: right;"><%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("PRICE3" )))%></td>
<td colspan="1" style="text-align: right;"><%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("SUPPLY_UNIT_PRICE")))%></td>
<td colspan="1" style="text-align: right;"><%=CommonUtils.numberFormat(CommonUtils.checkNull(map.get("SUPPLY_UNIT_VAT_PRICE")))%></td>
</tr>
<%
}
%>
<tr>
<td colspan="15" <%=sty_td_h%>>소계(원)</td>
<td colspan="4" style="text-align: right;"><%=CommonUtils.numberFormat(CommonUtils.checkNull((String)masterInfo.get("TOTAL_SUPPLY_UNIT_PRICE")))%></td>
<td colspan="1"></td>
</tr>
<tr>
<td colspan="12" <%=sty_td_h%>>할인적용 최종발주금액(원)</td>
<td colspan="2" style="text-align: right; background-color:#fbead9;">할인금액 </td>
<td colspan="3" style="text-align: right; background-color:#fbead9;">
<%=CommonUtils.numberFormat(CommonUtils.checkNull((String)masterInfo.get("DISCOUNT_PRICE")))%>
</td>
<td colspan="2" style="text-align: right; background-color:#fbead9;">
<%=CommonUtils.numberFormat(CommonUtils.checkNull((String)masterInfo.get("TOTAL_PRICE")))%>
</td>
<td colspan="1" style="text-align: right; background-color:#fbead9;">
<%=CommonUtils.checkNull((String)masterInfo.get("NEGO_RATE"))%>
</td>
</tr>
<tr></tr>
<tr>
<td rowspan="2" colspan="3" <%=sty_td_h%>>작업지시사항</td>
<td rowspan="2" colspan="8">${fn:replace(info.REMARK, replaceChar, "<br style=mso-data-placement:same-cell>")}</td>
<td rowspan="2" colspan="1" style="vertical-align: middle; text-align:center; background-color:#D5D5D5;">결 재</td>
<td colspan="2" <%=sty_td_h%>>담당</td>
<td colspan="2" <%=sty_td_h%>>검토</td>
<td colspan="2" <%=sty_td_h%>>결재</td>
<td colspan="2" <%=sty_td_h%>>대표</td>
</tr>
<tr>
<td colspan="2" style="text-align:center;"><%=arrAppr[0]%></td>
<td colspan="2" style="text-align:center;"><%=arrAppr[1]%></td>
<td colspan="2" style="text-align:center;"><%=arrAppr[2]%></td>
<td colspan="2" style="text-align:center;"><%=arrAppr[3]%></td>
</tr>
<tr>
<td colspan="20" style="text-align: right;">★거래명세서 작성시 필히 프로젝트명 과 발주서 사양 순서로 작성 바랍니다.</td>
</tr>
</table>
</body>
</html>