From 79e4b19fb232ed04fa57bc89090be76e8c1c37fe Mon Sep 17 00:00:00 2001 From: hjjeong Date: Tue, 9 Dec 2025 15:15:19 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EA=B0=80=EA=B3=B5=EB=82=A9=EA=B8=B0,=20?= =?UTF-8?q?=EC=97=B0=EC=82=AD=EB=82=A9=EA=B8=B0=20=EC=A3=BC=EC=84=9D?= =?UTF-8?q?=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WEB-INF/view/productionplanning/mBomHeaderPopup.jsp | 9 ++++++--- .../WEB-INF/view/productionplanning/mBomPopupLeft.jsp | 5 ++++- src/com/pms/mapper/productionplanning.xml | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/WebContent/WEB-INF/view/productionplanning/mBomHeaderPopup.jsp b/WebContent/WEB-INF/view/productionplanning/mBomHeaderPopup.jsp index 93bccf5..056ea9f 100644 --- a/WebContent/WEB-INF/view/productionplanning/mBomHeaderPopup.jsp +++ b/WebContent/WEB-INF/view/productionplanning/mBomHeaderPopup.jsp @@ -162,14 +162,16 @@ $(function(){ fn_closeWindow(); }); + /* 주석처리: 가공납기/연삭납기 일괄 적용 버튼 이벤트 // 일괄 적용 버튼 클릭 $("#btnApplyBulkDeadline").click(function(){ fn_applyBulkDeadline(); }); + */ }); -// 가공납기/연삭납기 일괄 적용 +/* 주석처리: 가공납기/연삭납기 일괄 적용 함수 function fn_applyBulkDeadline() { var processingDeadline = $("#bulk_processing_deadline").val(); var grindingDeadline = $("#bulk_grinding_deadline").val(); @@ -206,6 +208,7 @@ function fn_applyBulkDeadline() { alert("적용할 데이터가 없습니다."); } } +*/ // M-BOM 템플릿 로드 (Machine 이외 제품) function fn_loadMbomTemplate() { @@ -926,7 +929,7 @@ function compareItemFields(before, after) { - + diff --git a/WebContent/WEB-INF/view/productionplanning/mBomPopupLeft.jsp b/WebContent/WEB-INF/view/productionplanning/mBomPopupLeft.jsp index 8c3fea0..55a0fc6 100644 --- a/WebContent/WEB-INF/view/productionplanning/mBomPopupLeft.jsp +++ b/WebContent/WEB-INF/view/productionplanning/mBomPopupLeft.jsp @@ -537,6 +537,7 @@ function fn_initGrid() { values: ['업체A', '업체B', '업체C'] // TODO: 실제 가공업체 목록으로 교체 } }, + /* 주석처리: 가공납기, 연삭납기 컬럼 { headerHozAlign: 'center', hozAlign: 'center', @@ -555,6 +556,7 @@ function fn_initGrid() { titleFormatter: function() { return '연삭납기'; }, editor: 'date' }, + */ { headerHozAlign: 'center', hozAlign: 'left', @@ -843,7 +845,7 @@ function fn_searchMbom(searchParams) { }); } -// 가공납기/연삭납기 일괄 적용 +/* 주석처리: 가공납기/연삭납기 일괄 적용 function applyBulkDeadline(processingDeadline, grindingDeadline) { if(!_tabulGrid) { console.error("그리드가 초기화되지 않았습니다."); @@ -877,6 +879,7 @@ function applyBulkDeadline(processingDeadline, grindingDeadline) { console.log("업데이트 완료 - 업데이트된 행:", updatedCount); return updatedCount; } +*/ // M-BOM 트리 데이터 수집 (저장용) function getMbomTreeData() { diff --git a/src/com/pms/mapper/productionplanning.xml b/src/com/pms/mapper/productionplanning.xml index 4b0f593..f883803 100644 --- a/src/com/pms/mapper/productionplanning.xml +++ b/src/com/pms/mapper/productionplanning.xml @@ -4187,7 +4187,7 @@ V.STOCK_QTY, V.SHORTAGE_QTY, V.VENDOR, - (SELECT SUPPLY_NAME FROM ADMIN_SUPPLY_MNG WHERE OBJID::VARCHAR = V.VENDOR) AS VENDOR_NAME, + (SELECT CLIENT_NM FROM CLIENT_MNG WHERE OBJID::VARCHAR = V.VENDOR) AS VENDOR_NAME, V.UNIT_PRICE, V.TOTAL_PRICE, V.CURRENCY, -- 2.49.1 From 1207b5848f75462d690c7555b25d27dfc6323b3a Mon Sep 17 00:00:00 2001 From: hjjeong Date: Tue, 9 Dec 2025 16:13:41 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=EC=88=98=EC=9E=85=EA=B2=80=EC=82=AC?= =?UTF-8?q?=EA=B4=80=EB=A6=AC,=20=EA=B3=B5=EC=A0=95=EA=B2=80=EC=82=AC?= =?UTF-8?q?=EA=B4=80=EB=A6=AC=20=EC=83=81=EC=84=B8=EB=82=B4=EC=9A=A9=20?= =?UTF-8?q?=EC=97=91=EC=85=80=20=EB=8B=A4=EC=9A=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/quality/incomingInspectionExcel.jsp | 105 +++++++++++ .../view/quality/processInspectionExcel.jsp | 97 ++++++++++ WebContent/js/common.js | 5 +- src/com/pms/mapper/quality.xml | 178 +++++++++++++++--- src/com/pms/service/QualityService.java | 4 +- 5 files changed, 355 insertions(+), 34 deletions(-) create mode 100644 WebContent/WEB-INF/view/quality/incomingInspectionExcel.jsp create mode 100644 WebContent/WEB-INF/view/quality/processInspectionExcel.jsp diff --git a/WebContent/WEB-INF/view/quality/incomingInspectionExcel.jsp b/WebContent/WEB-INF/view/quality/incomingInspectionExcel.jsp new file mode 100644 index 0000000..d21bda2 --- /dev/null +++ b/WebContent/WEB-INF/view/quality/incomingInspectionExcel.jsp @@ -0,0 +1,105 @@ +<%@ 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 = "품질관리_수입검사관리"; +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"); +%> + + + + + +<%=Constants.SYSTEM_NAME%> + + +
+ +
+ + diff --git a/WebContent/WEB-INF/view/quality/processInspectionExcel.jsp b/WebContent/WEB-INF/view/quality/processInspectionExcel.jsp new file mode 100644 index 0000000..baf59cd --- /dev/null +++ b/WebContent/WEB-INF/view/quality/processInspectionExcel.jsp @@ -0,0 +1,97 @@ +<%@ 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 = "품질관리_공정검사관리"; +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"); +%> + + + + + +<%=Constants.SYSTEM_NAME%> + + +
+ +
+ + diff --git a/WebContent/js/common.js b/WebContent/js/common.js index bfed3c3..289e68b 100644 --- a/WebContent/js/common.js +++ b/WebContent/js/common.js @@ -2989,7 +2989,10 @@ $(document).ready(function() { if (gridToUse && gridToUse.getRows && gridToUse.getRows().length > 0) { var pageTitle = $('.plm_menu_name_gdnsi h2 span').text().trim(); - $('.btnArea').append(""); + // 이미 엑셀 버튼이 있으면 추가하지 않음 (#btnExcel 또는 .excel 클래스 체크) + if ($('#btnExcel').length === 0 && $('.btnArea .excel').length === 0) { + $('.btnArea').append(""); + } $(document).on('click', '.excelBtn', async function() { console.log("Excel 다운로드 버튼 클릭됨"); diff --git a/src/com/pms/mapper/quality.xml b/src/com/pms/mapper/quality.xml index 0135031..a5eede3 100644 --- a/src/com/pms/mapper/quality.xml +++ b/src/com/pms/mapper/quality.xml @@ -843,38 +843,100 @@ WHERE OBJID = #{OBJID} - + + + diff --git a/src/com/pms/service/QualityService.java b/src/com/pms/service/QualityService.java index c5580b3..aedbb1c 100644 --- a/src/com/pms/service/QualityService.java +++ b/src/com/pms/service/QualityService.java @@ -776,14 +776,14 @@ public class QualityService extends BaseService{ } /** - * 공정검사 목록 조회 (엑셀용) + * 공정검사 목록 조회 (엑셀용) - 상세 정보 포함 */ public List getProcessInspectionListForExcel(Map paramMap){ List resultList = new ArrayList(); SqlSession sqlSession = null; try{ sqlSession = SqlMapConfig.getInstance().getSqlSession(); - resultList = sqlSession.selectList("quality.getProcessInspectionList", paramMap); + resultList = sqlSession.selectList("quality.getProcessInspectionListForExcel", paramMap); }catch(Exception e){ e.printStackTrace(); }finally{ -- 2.49.1