From a48b7ab496b68ee1a6e2e36baa5ad69f6e37c9f7 Mon Sep 17 00:00:00 2001 From: leeheejin Date: Thu, 4 Dec 2025 14:24:34 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B5=AC=EB=A7=A4=EA=B4=80=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/contractMgmt/estimateViewPopup.jsp | 70 +++++++------- .../view/productionplanning/mBomMgmtList.jsp | 89 +++++------------- .../deliveryMngAcceptanceList.jsp | 94 ++++++++++--------- .../purchaseOrder/purchaseOrderList_new.jsp | 32 ++----- .../WEB-INF/view/salesMng/proposalMngList.jsp | 2 + .../view/salesMng/purchaseListFormPopUp.jsp | 52 +++++++++- .../view/salesMng/salesRequestFormPopUp.jsp | 24 ++++- .../view/salesMng/salesRequestMngRegList.jsp | 24 ++++- src/com/pms/mapper/salesMng.xml | 25 ++++- 9 files changed, 232 insertions(+), 180 deletions(-) diff --git a/WebContent/WEB-INF/view/contractMgmt/estimateViewPopup.jsp b/WebContent/WEB-INF/view/contractMgmt/estimateViewPopup.jsp index c97caf9..a306eb8 100644 --- a/WebContent/WEB-INF/view/contractMgmt/estimateViewPopup.jsp +++ b/WebContent/WEB-INF/view/contractMgmt/estimateViewPopup.jsp @@ -67,18 +67,18 @@ .item-table thead th { background-color: #f8f9fa; - padding: 6px; + padding: 8px; text-align: center; border: 1px solid #dee2e6; font-weight: bold; - font-size: 11px; + font-size: 13px; } .item-table tbody td { - padding: 5px; + padding: 8px; border: 1px solid #dee2e6; text-align: center; - font-size: 11px; + font-size: 13px; } .item-table tbody td.text-left { @@ -149,72 +149,72 @@ $(function() {
품목정보
- - - - - - - - - - - - - + <%-- --%><%-- No 컬럼 제거 --%> + + + + + + + <%-- --%><%-- 품번 컬럼 제거 --%> + <%-- --%><%-- 품명 컬럼 제거 --%> + <%-- --%><%-- S/N 컬럼 제거 --%> + <%-- --%><%-- 요청납기 컬럼 제거 --%> + + <%-- --%><%-- 고객요청사항 컬럼 제거 --%> - + <%-- --%><%-- No 컬럼 제거 --%> - - - - + <%-- --%><%-- 품번 컬럼 제거 --%> + <%-- --%><%-- 품명 컬럼 제거 --%> + <%-- --%><%-- S/N 컬럼 제거 --%> + <%-- --%><%-- 요청납기 컬럼 제거 --%> - + <%-- --%><%-- 고객요청사항 컬럼 제거 --%> - + <%-- --%><%-- No 컬럼 제거 --%> + <%-- --%><%-- 품번 컬럼 제거 --%> + <%-- --%><%-- 품명 컬럼 제거 --%> + <%-- --%><%-- S/N 컬럼 제거 --%> + <%-- --%><%-- 요청납기 컬럼 제거 --%> - - - - - + <%-- --%><%-- 고객요청사항 컬럼 제거 --%> - + <%-- --%><%-- No 컬럼 제거 --%> - - - - + <%-- --%><%-- 품번 컬럼 제거 --%> + <%-- --%><%-- 품명 컬럼 제거 --%> + <%-- --%><%-- S/N 컬럼 제거 --%> + <%-- --%><%-- 요청납기 컬럼 제거 --%> - + <%-- --%><%-- 고객요청사항 컬럼 제거 --%> diff --git a/WebContent/WEB-INF/view/productionplanning/mBomMgmtList.jsp b/WebContent/WEB-INF/view/productionplanning/mBomMgmtList.jsp index edd3122..0e559fb 100644 --- a/WebContent/WEB-INF/view/productionplanning/mBomMgmtList.jsp +++ b/WebContent/WEB-INF/view/productionplanning/mBomMgmtList.jsp @@ -140,24 +140,23 @@ var columns = [ field: 'PRODUCT_NAME' }, - // 부대표님이 컬럼 삭제하라고하심!(251128 국내/해외, 접수일, 고객사) // 5. 국내/해외 - // { - // headerHozAlign: 'center', - // hozAlign: 'center', - // width: 90, - // title: '국내/해외', - // field: 'AREA_NAME' - // }, + { + headerHozAlign: 'center', + hozAlign: 'center', + width: 90, + title: '국내/해외', + field: 'AREA_NAME' + }, // 6. 접수일 - // { - // headerHozAlign: 'center', - // hozAlign: 'center', - // width: 80, - // title: '접수일', - // field: 'RECEIPT_DATE' - // }, + { + headerHozAlign: 'center', + hozAlign: 'center', + width: 100, + title: '접수일', + field: 'RECEIPT_DATE' + }, // 7. 고객사 { @@ -169,13 +168,13 @@ var columns = [ }, // 8. 유/무상 - // { - // headerHozAlign: 'center', - // hozAlign: 'center', - // width: 80, - // title: '유/무상', - // field: 'PAID_TYPE_NAME' - // }, + { + headerHozAlign: 'center', + hozAlign: 'center', + width: 80, + title: '유/무상', + field: 'PAID_TYPE_NAME' + }, // 9. 품번 { @@ -248,55 +247,13 @@ var columns = [ } }, - // 16. 작성자 (M-BOM 작성자) - { - headerHozAlign: 'center', - hozAlign: 'center', - width: 90, - title: '작성자', - field: 'MBOM_EDITOR' - }, - // 16. 최종저장일 (M-BOM 작성일) { headerHozAlign: 'center', hozAlign: 'center', - width: 90, - title: '저장일', + width: 100, + title: '최종저장일', field: 'MBOM_REGDATE' - }, - - // 17. 버전 (M-BOM 버전) - { - headerHozAlign: 'center', - hozAlign: 'center', - width: 70, - title: '버전', - field: 'MBOM_VERSION', - cellClick: function(e, cell) { - var data = cell.getRow().getData(); - if(data.MBOM_HEADER_OBJID) { - fn_showMbomHistory(data.MBOM_HEADER_OBJID); - } else { - alert('M-BOM 이력이 없습니다.'); - } - }, - formatter: function(cell) { - var value = cell.getValue(); - if(value) { - return '' + value + ''; - } - return '-'; - } - }, - - // 18. 구매리스트 생성일 - { - headerHozAlign: 'center', - hozAlign: 'center', - width: 130, - title: '구매리스트 생성일', - field: 'PURCHASE_LIST_DATE' } ]; diff --git a/WebContent/WEB-INF/view/purchaseOrder/deliveryMngAcceptanceList.jsp b/WebContent/WEB-INF/view/purchaseOrder/deliveryMngAcceptanceList.jsp index b51e6d6..56875a4 100644 --- a/WebContent/WEB-INF/view/purchaseOrder/deliveryMngAcceptanceList.jsp +++ b/WebContent/WEB-INF/view/purchaseOrder/deliveryMngAcceptanceList.jsp @@ -78,56 +78,58 @@ $(document).ready(function(){ }); var columns = [ - - /* {headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '년도', field : 'CM_YEAR' }, */ - {headerHozAlign : 'center', hozAlign : 'left', width : '120', title : '고객사', field : 'CUSTOMER_NAME' }, - //{headerHozAlign : 'center', hozAlign : 'left', width : '150', title : '프로젝트명', field : 'CUSTOMER_PROJECT_NAME' }, - //{headerHozAlign : 'center', hozAlign : 'left', width : '200', title : '유닛명', field : 'UNIT_NAME' }, - {headerHozAlign : 'center', hozAlign : 'center', width : '130', title : '프로젝트번호', field : 'PROJECT_NO', - /* formatter:fnc_createGridAnchorTag, - cellClick:function(e, cell){ - var objid = fnc_checkNull(cell.getData().CONTRACT_OBJID); - openProjectFormPopUp(objid); - } */ + // 요구사항: 품의서 No, 발주서 No, 프로젝트번호, 품번, 품명, 공급업체, 발주수량, 입고수량, 미입고수량, 검사성적서, 입고결과 + {headerHozAlign : 'center', hozAlign : 'center', minWidth : 130, widthGrow : 1, title : '품의서 No', field : 'PROPOSAL_NO', + formatter:fnc_createGridAnchorTag, + cellClick:function(e, cell){ + var proposalObjId = fnc_checkNull(cell.getData().PROPOSAL_OBJID); + if(proposalObjId != ''){ + fn_openProposalPopUp(proposalObjId); + } + } }, - {headerHozAlign : 'center', hozAlign : 'center', width : '130', title : '발주번호', field : 'PURCHASE_ORDER_NO', + {headerHozAlign : 'center', hozAlign : 'center', minWidth : 130, widthGrow : 1, title : '발주서 No', field : 'PURCHASE_ORDER_NO', formatter:fnc_createGridAnchorTag, cellClick:function(e, cell){ var objId = fnc_checkNull(cell.getData().OBJID); fn_formPopUp(objId); } - }, - //{headerHozAlign : 'center', hozAlign : 'center', /*width : '73',*/ title : '동시', field : "MULTI_YN" }, - {headerHozAlign : 'center', hozAlign : 'left', /* width : '180',*/ title : '발주서_제목', field : 'TITLE' }, - {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '입고요청일', field : 'DELIVERY_DATE' }, - {headerHozAlign : 'center', hozAlign : 'left', width : '170', title : '구매/제작업체명', field : 'PARTNER_NAME' }, - {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '구매담당', field : 'SALES_MNG_USER_NAME' }, - {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '발주일', field : 'REGDATE' }, - {headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '발주수량', field : 'TOTAL_PO_QTY', + }, + {headerHozAlign : 'center', hozAlign : 'center', minWidth : 140, widthGrow : 1, title : '프로젝트번호', field : 'PROJECT_NO'}, + {headerHozAlign : 'center', hozAlign : 'left', minWidth : 140, widthGrow : 2, title : '품번', field : 'PART_NO' }, + {headerHozAlign : 'center', hozAlign : 'left', minWidth : 180, widthGrow : 3, title : '품명', field : 'PART_NAME' }, + {headerHozAlign : 'center', hozAlign : 'left', minWidth : 150, widthGrow : 2, title : '공급업체', field : 'PARTNER_NAME' }, + {headerHozAlign : 'center', hozAlign : 'right', minWidth : 90, widthGrow : 1, title : '발주수량', field : 'TOTAL_PO_QTY', formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false } }, - {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '입고일', field : 'CUR_DELIVERY_DATE' }, - {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '입고자', field : 'CUR_RECEIVER_NAME' }, - {headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '입고수량', field : 'TOTAL_DELIVERY_QTY', + {headerHozAlign : 'center', hozAlign : 'right', minWidth : 90, widthGrow : 1, title : '입고수량', field : 'TOTAL_DELIVERY_QTY', formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false } }, - {headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '미입고수량', field : 'NON_DELIVERY_QTY', + {headerHozAlign : 'center', hozAlign : 'right', minWidth : 90, widthGrow : 1, title : '미입고수량', field : 'NON_DELIVERY_QTY', formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false } }, - /* {headerHozAlign : 'center', hozAlign : 'right', width : '90', title : '부적합수량', field : 'TOTAL_DEFECT_QTY', - formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false } - }, */ - {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '입고결과', field : 'DELIVERY_STATUS', + {headerHozAlign : 'center', hozAlign : 'center', minWidth : 100, widthGrow : 1, title : '검사성적서', field : 'INSPECTION_FILE', + formatter: function(cell, formatterParams, onRendered){ + var fileYn = fnc_checkNull(cell.getValue()); + if(fileYn === 'Y'){ + return ''; + } + return ''; + }, + cellClick:function(e, cell){ + var objId = fnc_checkNull(cell.getData().OBJID); + fn_openInspectionFilePopUp(objId); + } + }, + {headerHozAlign : 'center', hozAlign : 'center', minWidth : 90, widthGrow : 1, title : '입고결과', field : 'DELIVERY_STATUS', formatter:fnc_createGridAnchorTag, cellClick:function(e, cell){ var objId = fnc_checkNull(cell.getData().OBJID); var DELIVERY_STATUS = fnc_checkNull(cell.getData().DELIVERY_STATUS); var purchaseOrderNo = fnc_checkNull(cell.getData().PURCHASE_ORDER_NO); fn_deliveryAcceptanceViewPopUp(objId,DELIVERY_STATUS); - //fn_deliveryResultPopUp(objId,purchaseOrderNo); } } - ]; //var grid; @@ -282,6 +284,22 @@ function fn_formPopUp(objId){ hiddenForm.submit(); } +// 품의서 팝업 +function fn_openProposalPopUp(proposalObjId){ + var popup_width = 1200; + var popup_height = 900; + var url = "/salesMng/proposalFormPopUp.do?PROPOSAL_OBJID=" + proposalObjId; + window.open(url, "proposalFormPopUp", "width="+popup_width+",height="+popup_height+",scrollbars=yes,resizable=yes"); +} + +// 검사성적서 파일 팝업 +function fn_openInspectionFilePopUp(objId){ + var popup_width = 700; + var popup_height = 500; + var url = "/common/FileRegistPopup.do?docType=INSPECTION_FILE&targetObjId=" + objId + "&docTypeName=검사성적서"; + window.open(url, "inspectionFilePopUp", "width="+popup_width+",height="+popup_height+",scrollbars=yes,resizable=yes"); +} + @@ -302,10 +320,11 @@ function fn_formPopUp(objId){
- - + + <%-- --%>
+ <%-- 검색필터 주석처리
NoNo주문유형 제품구분 국내/해외 고객사 유/무상 견적환종품번품명S/N요청납기품번품명S/N요청납기반납사유고객요청사항고객요청사항
11${info["CATEGORY_NAME"]} ${info["PRODUCT_NAME"]} ${info["AREA_NAME"]} ${info["CUSTOMER_NAME"]} ${info["PAID_TYPE_NAME"]} ${info["CONTRACT_CURRENCY_NAME"]}-----------
${status.count}${status.count}${info["CATEGORY_NAME"]} ${info["PRODUCT_NAME"]} ${info["AREA_NAME"]} ${info["CUSTOMER_NAME"]} ${info["PAID_TYPE_NAME"]} ${info["CONTRACT_CURRENCY_NAME"]}${item.part_no}${item.part_name}${item.serial_nos}${item.due_date}${item.part_no}${item.part_name}${item.serial_nos}${item.due_date}${item.return_reason}${item.customer_request}${item.customer_request}
@@ -314,7 +333,6 @@ function fn_formPopUp(objId){ @@ -323,9 +341,6 @@ function fn_formPopUp(objId){ - <%-- - --%> - - - @@ -385,6 +394,7 @@ function fn_formPopUp(objId){
+ --%> <%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %> diff --git a/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderList_new.jsp b/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderList_new.jsp index adaf0de..051692c 100644 --- a/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderList_new.jsp +++ b/WebContent/WEB-INF/view/purchaseOrder/purchaseOrderList_new.jsp @@ -387,6 +387,7 @@ function fn_search(){ _tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/purchaseOrder/purchaseOrderListPaging.do", columns, true, null, null, null, null, null, null, false, rowSelectionControl); //_tabul_layout_fitColumns _tabul_layout_fitDataStretch _tabulGrid.on("rowSelectionChanged", rowSelectionControl); + /* 총발주금액 주석처리 var _sum=0; var _sum2=0; var text ="   총발주금액(원) : "; @@ -409,6 +410,7 @@ function fn_search(){ //text2 = ''; //$(".purchaseOrderSum").html(text+text2); $(".purchaseOrderSum").html(text); + */ } function rowSelectionControl (data, rows) { @@ -810,6 +812,7 @@ function fn_openMailFormPopup(purchaseOrderObjId){ + <%-- 검색필터 주석처리
@@ -827,17 +830,8 @@ function fn_openMailFormPopup(purchaseOrderObjId){ - <%-- - --%> - - - @@ -879,28 +873,14 @@ function fn_openMailFormPopup(purchaseOrderObjId){ -
+ --%> + <%-- 총발주금액 주석처리
+ --%> <%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %> diff --git a/WebContent/WEB-INF/view/salesMng/proposalMngList.jsp b/WebContent/WEB-INF/view/salesMng/proposalMngList.jsp index be42926..522f3a1 100644 --- a/WebContent/WEB-INF/view/salesMng/proposalMngList.jsp +++ b/WebContent/WEB-INF/view/salesMng/proposalMngList.jsp @@ -238,6 +238,7 @@ function _fnc_datepick(){ + <%-- 검색필터 주석처리
@@ -269,6 +270,7 @@ function _fnc_datepick(){
+ --%> <%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %> diff --git a/WebContent/WEB-INF/view/salesMng/purchaseListFormPopUp.jsp b/WebContent/WEB-INF/view/salesMng/purchaseListFormPopUp.jsp index 6f7d616..ea93655 100644 --- a/WebContent/WEB-INF/view/salesMng/purchaseListFormPopUp.jsp +++ b/WebContent/WEB-INF/view/salesMng/purchaseListFormPopUp.jsp @@ -48,13 +48,20 @@ body, html { .info-table { width: 100%; border-collapse: collapse; + background: #fff; + border: 1px solid #ddd; } .info-table td { - padding: 5px 10px; + padding: 8px 15px; + border: 1px solid #eee; } .info-table label { font-weight: bold; - margin-right: 10px; + color: #555; + margin-right: 8px; +} +.info-table span { + color: #333; } .content { flex: 1; @@ -66,11 +73,52 @@ body, html {
+

구매리스트

+ + + + + + + + + + + + + + + +
+ + ${resultMap.PROJECT_NO} + + + ${resultMap.CUSTOMER_NAME} + + + ${resultMap.PART_NO} + + + ${resultMap.PART_NAME} +
+ + ${resultMap.PURCHASE_TYPE_NAME} + + + ${resultMap.REQUEST_MNG_NO} + + + ${resultMap.REQUEST_USER_NAME} + + + ${resultMap.DELIVERY_REQUEST_DATE} +
diff --git a/WebContent/WEB-INF/view/salesMng/salesRequestFormPopUp.jsp b/WebContent/WEB-INF/view/salesMng/salesRequestFormPopUp.jsp index ee3c414..e79a02a 100644 --- a/WebContent/WEB-INF/view/salesMng/salesRequestFormPopUp.jsp +++ b/WebContent/WEB-INF/view/salesMng/salesRequestFormPopUp.jsp @@ -654,6 +654,7 @@ function fn_callbackFnc(){ + @@ -667,20 +668,27 @@ function fn_callbackFnc(){ ${code_map.project_no} + + + + + + + - - ${code_map.customer_objid} @@ -700,11 +707,20 @@ function fn_callbackFnc(){ ${code_map.paid_type} + + + - + + + + + + +
diff --git a/WebContent/WEB-INF/view/salesMng/salesRequestMngRegList.jsp b/WebContent/WEB-INF/view/salesMng/salesRequestMngRegList.jsp index 9526ccf..bd82fb0 100644 --- a/WebContent/WEB-INF/view/salesMng/salesRequestMngRegList.jsp +++ b/WebContent/WEB-INF/view/salesMng/salesRequestMngRegList.jsp @@ -211,8 +211,28 @@ var columns = [ } } } - ,{headerHozAlign : 'center', hozAlign : 'center', title : "요청인", field :"REQUEST_USER_NAME" , widthGrow:1.1 } - ,{headerHozAlign : 'center', hozAlign : 'center', title : "입고요청일", field :"DELIVERY_REQUEST_DATE" , widthGrow:1.1 } + ,{headerHozAlign : 'center', hozAlign : 'center', title : "요청인", field :"REQUEST_USER_NAME" , widthGrow:1.1, + // 요청인: 구매요청서 작성 시에만 표시 + formatter: function(cell, formatterParams, onRendered){ + var data = cell.getData(); + var hasPurchaseRequest = fnc_checkNull(data.HAS_PURCHASE_REQUEST); + if(hasPurchaseRequest == 'Y') { + return fnc_checkNull(data.REQUEST_USER_NAME); + } + return '-'; + } + } + ,{headerHozAlign : 'center', hozAlign : 'center', title : "입고요청일", field :"DELIVERY_REQUEST_DATE" , widthGrow:1.1, + // 입고요청일: 구매요청서 작성 시에만 표시 + formatter: function(cell, formatterParams, onRendered){ + var data = cell.getData(); + var hasPurchaseRequest = fnc_checkNull(data.HAS_PURCHASE_REQUEST); + if(hasPurchaseRequest == 'Y') { + return fnc_checkNull(data.DELIVERY_REQUEST_DATE); + } + return '-'; + } + } ,{headerHozAlign : 'center', hozAlign : 'center', title : "작성일", field :"REGDATE_TITLE" , widthGrow:1.1 } ]; diff --git a/src/com/pms/mapper/salesMng.xml b/src/com/pms/mapper/salesMng.xml index c9877d9..a7fe316 100644 --- a/src/com/pms/mapper/salesMng.xml +++ b/src/com/pms/mapper/salesMng.xml @@ -712,12 +712,30 @@ VALUES -- 저장된 값 우선, 없으면 조인으로 가져오기 COALESCE(NULLIF(SRM.PURCHASE_TYPE, ''), POM.TYPE) AS PURCHASE_TYPE, -- 구매유형 + (SELECT CODE_NAME FROM COMM_CODE WHERE CODE_ID = COALESCE(NULLIF(SRM.PURCHASE_TYPE, ''), POM.TYPE)) AS PURCHASE_TYPE_NAME, -- 구매유형명 COALESCE(NULLIF(SRM.ORDER_TYPE, ''), POM.ORDER_TYPE_CD) AS ORDER_TYPE, -- 주문유형 COALESCE(NULLIF(SRM.PRODUCT_NAME, ''), PM.PRODUCT) AS PRODUCT_NAME, -- 제품구분 COALESCE(NULLIF(SRM.AREA_CD, ''), SM.AREA_CD) AS AREA_CD, -- 국내/해외 COALESCE(NULLIF(SRM.CUSTOMER_OBJID, ''), SM.OBJID::VARCHAR) AS CUSTOMER_OBJID, -- 고객사 COALESCE(NULLIF(SRM.PAID_TYPE, ''), CM.PAID_TYPE) AS PAID_TYPE, -- 유/무상 - CM.CATEGORY_CD AS CATEGORY_CD -- 제품유형 코드 ID (드롭다운 선택용) + CM.CATEGORY_CD AS CATEGORY_CD, -- 제품유형 코드 ID (드롭다운 선택용) + -- 품번/품명: 첫 번째 품목 + 외 N건 형태 + (SELECT + CASE + WHEN (SELECT COUNT(*) FROM SALES_REQUEST_PART WHERE SALES_REQUEST_MASTER_OBJID = SRM.OBJID) > 1 THEN + COALESCE((SELECT PM2.PART_NO FROM PART_MNG PM2 WHERE PM2.OBJID::VARCHAR = (SELECT PART_OBJID FROM SALES_REQUEST_PART WHERE SALES_REQUEST_MASTER_OBJID = SRM.OBJID ORDER BY REGDATE LIMIT 1)), '') || ' 외 ' || ((SELECT COUNT(*) FROM SALES_REQUEST_PART WHERE SALES_REQUEST_MASTER_OBJID = SRM.OBJID) - 1)::TEXT || '건' + ELSE + COALESCE((SELECT PM2.PART_NO FROM PART_MNG PM2 WHERE PM2.OBJID::VARCHAR = (SELECT PART_OBJID FROM SALES_REQUEST_PART WHERE SALES_REQUEST_MASTER_OBJID = SRM.OBJID ORDER BY REGDATE LIMIT 1)), '') + END + ) AS PART_NO, + (SELECT + CASE + WHEN (SELECT COUNT(*) FROM SALES_REQUEST_PART WHERE SALES_REQUEST_MASTER_OBJID = SRM.OBJID) > 1 THEN + COALESCE((SELECT PM2.PART_NAME FROM PART_MNG PM2 WHERE PM2.OBJID::VARCHAR = (SELECT PART_OBJID FROM SALES_REQUEST_PART WHERE SALES_REQUEST_MASTER_OBJID = SRM.OBJID ORDER BY REGDATE LIMIT 1)), '') || ' 외 ' || ((SELECT COUNT(*) FROM SALES_REQUEST_PART WHERE SALES_REQUEST_MASTER_OBJID = SRM.OBJID) - 1)::TEXT || '건' + ELSE + COALESCE((SELECT PM2.PART_NAME FROM PART_MNG PM2 WHERE PM2.OBJID::VARCHAR = (SELECT PART_OBJID FROM SALES_REQUEST_PART WHERE SALES_REQUEST_MASTER_OBJID = SRM.OBJID ORDER BY REGDATE LIMIT 1)), '') + END + ) AS PART_NAME FROM SALES_REQUEST_MASTER SRM @@ -3402,11 +3420,12 @@ ORDER BY V.PATH2 WHERE DOC_TYPE = 'PURCHASE_REQUEST' OR DOC_TYPE IS NULL - +