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/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/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, 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{