diff --git a/WebContent/WEB-INF/view/partMng/openPartExcelImportPopUp.jsp b/WebContent/WEB-INF/view/partMng/openPartExcelImportPopUp.jsp index 32c6a4f..1be877a 100644 --- a/WebContent/WEB-INF/view/partMng/openPartExcelImportPopUp.jsp +++ b/WebContent/WEB-INF/view/partMng/openPartExcelImportPopUp.jsp @@ -49,7 +49,8 @@ $(document).ready(function(){ url: "" ,datatype: "local" ,colNames: ["결과", - "품번","품명","재료","열처리경도","열처리방법","표면처리","공급업체","범주 이름","계정구분","조달구분","비고"] //PART구분(부품 유형) + "품번","품명","재료","열처리경도","열처리방법","표면처리","메이커","범주 이름","규격","계정구분","조달구분", + "재고단위","관리단위","환산수량","LOT구분","사용여부","검사여부","SET품여부","의뢰여부","개당길이","개당소요량","비고"] //PART구분(부품 유형) ,colModel: [ /* */ {name:"NOTE",index:"NOTE", width: 200, align:"left", hidden: false, sortable:false, editable:true @@ -157,6 +158,13 @@ $(document).ready(function(){ } } } + ,{name:"SPEC",index:"SPEC", width: 100, align:"center", hidden: false, sortable:false, editable:true + ,editoptions:{ + dataInit : function(e){ + e.style.fontSize = 13; + } + } + } ,{name:"ACCTFG" ,index:"ACCTFG" , width:80, align:"center", hidden:false, sortable:false, editable: true ,edittype :"select" ,formatter :"select" @@ -172,13 +180,103 @@ $(document).ready(function(){ ,edittype :"select" ,formatter :"select" ,editoptions:{ - value: {"":"선택","0":"구매","1":"생산"} + value: {"":"선택","0":"구매","1":"생산","8":"Phantom"} ,dataInit : function(e){ e.style.width = "92%"; e.style.fontSize = 13; } } } + ,{name:"UNIT_DC",index:"UNIT_DC", width: 70, align:"center", hidden: false, sortable:false, editable:true + ,editoptions:{ + dataInit : function(e){ + e.style.fontSize = 13; + } + } + } + ,{name:"UNITMANG_DC",index:"UNITMANG_DC", width: 70, align:"center", hidden: false, sortable:false, editable:true + ,editoptions:{ + dataInit : function(e){ + e.style.fontSize = 13; + } + } + } + ,{name:"UNITCHNG_NB",index:"UNITCHNG_NB", width: 70, align:"center", hidden: false, sortable:false, editable:true + ,editoptions:{ + dataInit : function(e){ + e.style.fontSize = 13; + } + } + } + ,{name:"LOT_FG" ,index:"LOT_FG" , width:70, align:"center", hidden:false, sortable:false, editable: true + ,edittype :"select" + ,formatter :"select" + ,editoptions:{ + value: {"0":"미사용","1":"사용"} + ,dataInit : function(e){ + e.style.width = "92%"; + e.style.fontSize = 13; + } + } + } + ,{name:"USE_YN" ,index:"USE_YN" , width:70, align:"center", hidden:false, sortable:false, editable: true + ,edittype :"select" + ,formatter :"select" + ,editoptions:{ + value: {"1":"사용","0":"미사용"} + ,dataInit : function(e){ + e.style.width = "92%"; + e.style.fontSize = 13; + } + } + } + ,{name:"QC_FG" ,index:"QC_FG" , width:70, align:"center", hidden:false, sortable:false, editable: true + ,edittype :"select" + ,formatter :"select" + ,editoptions:{ + value: {"0":"무검사","1":"검사"} + ,dataInit : function(e){ + e.style.width = "92%"; + e.style.fontSize = 13; + } + } + } + ,{name:"SETITEM_FG" ,index:"SETITEM_FG" , width:70, align:"center", hidden:false, sortable:false, editable: true + ,edittype :"select" + ,formatter :"select" + ,editoptions:{ + value: {"0":"부","1":"여"} + ,dataInit : function(e){ + e.style.width = "92%"; + e.style.fontSize = 13; + } + } + } + ,{name:"REQ_FG" ,index:"REQ_FG" , width:70, align:"center", hidden:false, sortable:false, editable: true + ,edittype :"select" + ,formatter :"select" + ,editoptions:{ + value: {"0":"부","1":"여"} + ,dataInit : function(e){ + e.style.width = "92%"; + e.style.fontSize = 13; + } + } + } + ,{name:"UNIT_LENGTH",index:"UNIT_LENGTH", width: 70, align:"center", hidden: false, sortable:false, editable:true + ,editoptions:{ + dataInit : function(e){ + e.style.fontSize = 13; + } + } + } + ,{name:"UNIT_QTY",index:"UNIT_QTY", width: 80, align:"center", hidden: false, sortable:false, editable:true + ,editoptions:{ + dataInit : function(e){ + e.style.fontSize = 13; + } + } + } ,{name:"REMARK",index:"REMARK", width: 130, align:"center", hidden: false, sortable:false, editable:true ,editoptions:{ dataInit : function(e){ diff --git a/WebContent/WEB-INF/view/partMng/partMngDetailPopUp.jsp b/WebContent/WEB-INF/view/partMng/partMngDetailPopUp.jsp index a0f52a8..3f7b38d 100644 --- a/WebContent/WEB-INF/view/partMng/partMngDetailPopUp.jsp +++ b/WebContent/WEB-INF/view/partMng/partMngDetailPopUp.jsp @@ -599,6 +599,7 @@ section { + diff --git a/WebContent/WEB-INF/view/partMng/partMngFormPopUp.jsp b/WebContent/WEB-INF/view/partMng/partMngFormPopUp.jsp index ad8dbf5..169eed2 100644 --- a/WebContent/WEB-INF/view/partMng/partMngFormPopUp.jsp +++ b/WebContent/WEB-INF/view/partMng/partMngFormPopUp.jsp @@ -416,6 +416,7 @@ function fn_overlapPartMng(){ + diff --git a/WebContent/WEB-INF/view/partMng/partMngList.jsp b/WebContent/WEB-INF/view/partMng/partMngList.jsp index 5ab3b5e..071c468 100644 --- a/WebContent/WEB-INF/view/partMng/partMngList.jsp +++ b/WebContent/WEB-INF/view/partMng/partMngList.jsp @@ -156,7 +156,7 @@ String connector = person.getUserId(); }); var columns = [ - {title:'OBJID', field:'OBJID' ,visible:false }, + {title:'OBJID', field:'OBJID' ,visible:false ,frozen:true}, //{headerHozAlign : 'center', hozAlign : 'center', width : '30', title : '순', field : 'NUM' , headersorting:false}, //{headerHozAlign : 'center', hozAlign : 'left ', width : '100', title : '프로젝트번호', field : 'PROJECT_NO' }, @@ -174,14 +174,14 @@ String connector = person.getUserId(); }, */ //{headerHozAlign : 'center', hozAlign : 'left', width : '125', title : '모품번', field : 'PARENT_PART_INFO' }, - {headerHozAlign : 'center', hozAlign : 'left', width : '250', title : '품번', field : 'PART_NO', + {headerHozAlign : 'center', hozAlign : 'left', width : '180', title : '품번', field : 'PART_NO', frozen:true, formatter:fnc_createGridAnchorTag, cellClick:function(e, cell){ var objid = fnc_checkNull(cell.getData().OBJID); openPartMngPopup(objid); } }, - {headerHozAlign : 'center', hozAlign : 'left', /*width : '200',*/ title : '품명', field : 'PART_NAME' }, + {headerHozAlign : 'center', hozAlign : 'left', width : '180', title : '품명', field : 'PART_NAME' ,frozen:true}, // {headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '수량', field : 'BOM_QTY' }, //Q_QTY QTY QTY_P {headerHozAlign : 'center', hozAlign : 'center', width : '60', title : '3D', field : 'CU01_CNT', formatter:fnc_subInfoValueFormatter, @@ -215,19 +215,21 @@ String connector = person.getUserId(); {headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '열처리방법', field : 'HEAT_TREATMENT_METHOD' }, {headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '표면처리', field : 'SURFACE_TREATMENT' }, {headerHozAlign : 'center', hozAlign : 'center', width : '150', title : '메이커', field : 'MAKER' }, - {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '범주 이름', field : 'PART_TYPE_TITLE' }, - - // {headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '재질', field : 'MATERIAL' }, - // {headerHozAlign : 'center', hozAlign : 'left', width : '90', title : '사양(규격)', field : 'SPEC' }, - // {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '후처리', field : 'POST_PROCESSING' }, - // {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : 'MAKER', field : 'MAKER' }, - // {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '대분류', field : 'MAJOR_CATEGORY' }, - // {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '중분류', field : 'SUB_CATEGORY' }, - //{headerHozAlign : 'center', hozAlign : 'center', width : '90', title : 'Revision', field : 'REVISION' }, - //{headerHozAlign : 'center', hozAlign : 'center', width : '90', title : 'EO No', field : 'EO_NO' }, - //{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : 'EO Date', field : 'EO_DATE' }, -// {headerHozAlign : 'center', hozAlign : 'center', width : '88', title : 'PART구분', field : 'PART_TYPE_TITLE' }, - {headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '비고', field : 'REMARK' } + {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '범주 이름', field : 'PART_TYPE_TITLE' }, + {headerHozAlign : 'center', hozAlign : 'left', width : '100', title : '규격', field : 'SPEC' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '계정구분', field : 'ACCTFG_NM' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '조달구분', field : 'ODRFG_NM' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '재고단위', field : 'UNIT_DC' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '관리단위', field : 'UNITMANG_DC' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '환산수량', field : 'UNITCHNG_NB' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : 'LOT구분', field : 'LOT_FG_NM' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '사용여부', field : 'USE_YN_NM' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '검사여부', field : 'QC_FG_NM' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '90', title : 'SET품여부', field : 'SETITEM_FG_NM' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '의뢰여부', field : 'REQ_FG_NM' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '개당길이', field : 'UNIT_LENGTH' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '개당소요량', field : 'UNIT_QTY' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '비고', field : 'REMARK' } ]; //var grid; diff --git a/WebContent/WEB-INF/view/partMng/partMngTempList.jsp b/WebContent/WEB-INF/view/partMng/partMngTempList.jsp index 0ae7e76..5f2543a 100644 --- a/WebContent/WEB-INF/view/partMng/partMngTempList.jsp +++ b/WebContent/WEB-INF/view/partMng/partMngTempList.jsp @@ -144,14 +144,14 @@ ui-jqgrid tr.jqgrow td { // {headerHozAlign : 'center', hozAlign : 'center', width : '60', title : '순', field : 'RNUM' ,frozen:true}, // {headerHozAlign : 'center', hozAlign : 'left', width : '125', title : '모품번', field : 'PARENT_PART_INFO' ,frozen:true}, - {headerHozAlign : 'center', hozAlign : 'left', width : '250', title : '품번', field : 'PART_NO',frozen:true, + {headerHozAlign : 'center', hozAlign : 'left', width : '180', title : '품번', field : 'PART_NO',frozen:true, formatter:fnc_createGridAnchorTag, cellClick:function(e, cell){ var objid = fnc_checkNull(cell.getData().OBJID); openPartMngPopup(objid); } }, - {headerHozAlign : 'center', hozAlign : 'left', /*width : '200',*/ title : '품명', field : 'PART_NAME' ,frozen:true}, + {headerHozAlign : 'center', hozAlign : 'left', width : '180', title : '품명', field : 'PART_NAME' ,frozen:true}, // {headerHozAlign : 'center', hozAlign : 'center', width : '70', title : '수량', field : 'Q_QTY' }, {headerHozAlign : 'center', hozAlign : 'center', width : '60', title : '3D', field : 'CU01_CNT', formatter:fnc_subInfoValueFormatter, @@ -186,16 +186,19 @@ ui-jqgrid tr.jqgrow td { {headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '표면처리', field : 'SURFACE_TREATMENT' }, {headerHozAlign : 'center', hozAlign : 'center', width : '150', title : '메이커', field : 'MAKER' }, {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '범주 이름', field : 'PART_TYPE_TITLE' }, - - // {headerHozAlign : 'center', hozAlign : 'left', width : '190', title : '사양(규격)', field : 'SPEC' }, -// {headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '후처리', field : 'POST_PROCESSING' }, -// {headerHozAlign : 'center', hozAlign : 'center', width : '90', title : 'MAKER', field : 'MAKER' }, -// {headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '대분류', field : 'MAJOR_CATEGORY' }, -// {headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '중분류', field : 'SUB_CATEGORY' }, -// {headerHozAlign : 'center', hozAlign : 'center', width : '90', title : 'Revision', field : 'REVISION' }, -// {headerHozAlign : 'center', hozAlign : 'center', width : '90', title : 'EO No', field : 'EO_NO' }, -// {headerHozAlign : 'center', hozAlign : 'center', width : '90', title : 'EO Date', field : 'EO_DATE' }, -// {headerHozAlign : 'center', hozAlign : 'center', width : '90', title : 'PART 구분', field : 'PART_TYPE_TITLE' }, + {headerHozAlign : 'center', hozAlign : 'left', width : '100', title : '규격', field : 'SPEC' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '계정구분', field : 'ACCTFG_NM' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '조달구분', field : 'ODRFG_NM' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '재고단위', field : 'UNIT_DC' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '관리단위', field : 'UNITMANG_DC' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '환산수량', field : 'UNITCHNG_NB' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : 'LOT구분', field : 'LOT_FG_NM' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '사용여부', field : 'USE_YN_NM' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '검사여부', field : 'QC_FG_NM' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '90', title : 'SET품여부', field : 'SETITEM_FG_NM' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '의뢰여부', field : 'REQ_FG_NM' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '개당길이', field : 'UNIT_LENGTH' }, + {headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '개당소요량', field : 'UNIT_QTY' }, {headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '비고', field : 'REMARK' } ]; diff --git a/WebContent/template/PART_EXCEL_IMPORT_TEMPLATE.xlsx b/WebContent/template/PART_EXCEL_IMPORT_TEMPLATE.xlsx index b2c2454..ebf7d49 100644 Binary files a/WebContent/template/PART_EXCEL_IMPORT_TEMPLATE.xlsx and b/WebContent/template/PART_EXCEL_IMPORT_TEMPLATE.xlsx differ diff --git a/src/com/pms/mapper/partMng.xml b/src/com/pms/mapper/partMng.xml index d390ba0..50f0d6d 100644 --- a/src/com/pms/mapper/partMng.xml +++ b/src/com/pms/mapper/partMng.xml @@ -158,15 +158,22 @@ P.HEAT_TREATMENT_METHOD, P.SURFACE_TREATMENT, P.ACCTFG, + (SELECT CODE_NAME FROM COMM_CODE WHERE CODE_ID = P.ACCTFG) AS ACCTFG_NM, P.ODRFG, + CASE WHEN P.ODRFG = '0' THEN '구매' WHEN P.ODRFG = '1' THEN '생산' WHEN P.ODRFG = '8' THEN 'Phantom' ELSE '' END AS ODRFG_NM, P.UNIT_DC, P.UNITMANG_DC, P.UNITCHNG_NB, P.LOT_FG, + CASE WHEN P.LOT_FG = '1' THEN '사용' WHEN P.LOT_FG = '0' THEN '미사용' ELSE '' END AS LOT_FG_NM, P.USE_YN, + CASE WHEN P.USE_YN = '1' THEN '사용' WHEN P.USE_YN = '0' THEN '미사용' ELSE '' END AS USE_YN_NM, P.QC_FG, + CASE WHEN P.QC_FG = '1' THEN '검사' WHEN P.QC_FG = '0' THEN '무검사' ELSE '' END AS QC_FG_NM, P.SETITEM_FG, + CASE WHEN P.SETITEM_FG = '1' THEN '여' WHEN P.SETITEM_FG = '0' THEN '부' ELSE '' END AS SETITEM_FG_NM, P.REQ_FG, + CASE WHEN P.REQ_FG = '1' THEN '여' WHEN P.REQ_FG = '0' THEN '부' ELSE '' END AS REQ_FG_NM, P.UNIT_LENGTH, P.UNIT_QTY, COALESCE(FILE_CNT.CU01_CNT, 0) CU01_CNT, diff --git a/src/com/pms/service/BatchService.java b/src/com/pms/service/BatchService.java index b502c15..82b9dc0 100644 --- a/src/com/pms/service/BatchService.java +++ b/src/com/pms/service/BatchService.java @@ -1441,10 +1441,29 @@ public class BatchService extends BaseService { return result; } - // ERP로 전송 + // ERP로 전송 - 전송 데이터 로그 출력 + System.out.println("====== ERP 전송 데이터 ======"); + System.out.println("coCd: " + coCd); + System.out.println("itemCd(품번): " + itemCd); + System.out.println("itemNm(품명): " + itemNm); + System.out.println("itemDc(규격): " + itemDc); + System.out.println("acctFg(계정구분): " + acctFg); + System.out.println("odrFg(조달구분): " + odrFg); + System.out.println("unitDc(재고단위): " + unitDc); + System.out.println("unitmangDc(관리단위): " + unitmangDc); + System.out.println("unitchngNb(환산수량): " + unitchngNb); + System.out.println("lotFg(LOT구분): " + lotFg); + System.out.println("qcFg(검사여부): " + qcFg); + System.out.println("reqFg(의뢰여부): " + reqFg); + System.out.println("setitemFg(SET품여부): " + setitemFg); + System.out.println("useYn(사용여부): " + useYn); + System.out.println("============================="); + PartErpApiClient partErpClient = new PartErpApiClient(); String response = partErpClient.sendPartToErp(baseUrl, coCd, itemCd, itemNm, itemDc, acctFg, odrFg, unitDc, unitmangDc, unitchngNb, lotFg, qcFg, reqFg, setitemFg, useYn); + + System.out.println("ERP 응답: " + response); // 응답 확인 if (response.contains("\"resultCode\":0") || response.contains("\"resultCode\":\"0\"")) { diff --git a/src/com/pms/service/PartMngService.java b/src/com/pms/service/PartMngService.java index fb38c31..5870cac 100644 --- a/src/com/pms/service/PartMngService.java +++ b/src/com/pms/service/PartMngService.java @@ -3066,6 +3066,10 @@ public class PartMngService extends BaseService { } } + // 규격(SPEC) + String specValue = getCellValue(row, columnIndex++, formatter, emptyColCnt); + partMap.put("SPEC", specValue.trim()); + // 계정구분(ACCTFG) - 한글명 입력 시 코드값으로 변환 String acctfgValue = getCellValue(row, columnIndex++, formatter, emptyColCnt); if(!CommonUtils.isBlank(acctfgValue)){ @@ -3085,13 +3089,15 @@ public class PartMngService extends BaseService { } else { partMap.put("ACCTFG", ""); } - // 조달구분(ODRFG) - 한글명 입력 시 코드값으로 변환 + // 조달구분(ODRFG) - 한글명 입력 시 코드값으로 변환 (0:구매, 1:생산, 8:Phantom) String odrfgValue = getCellValue(row, columnIndex++, formatter, emptyColCnt); if(!CommonUtils.isBlank(odrfgValue)){ if("구매".equals(odrfgValue.trim())){ partMap.put("ODRFG", "0"); } else if("생산".equals(odrfgValue.trim())){ partMap.put("ODRFG", "1"); + } else if("Phantom".equalsIgnoreCase(odrfgValue.trim())){ + partMap.put("ODRFG", "8"); } else { partMap.put("ODRFG", odrfgValue); // 숫자면 그대로 } @@ -3178,6 +3184,14 @@ public class PartMngService extends BaseService { partMap.put("REQ_FG", "0"); } + // 개당길이(UNIT_LENGTH) + String unitLength = getCellValue(row, columnIndex++, formatter, emptyColCnt); + partMap.put("UNIT_LENGTH", unitLength.trim()); + + // 개당소요량(UNIT_QTY) + String unitQty = getCellValue(row, columnIndex++, formatter, emptyColCnt); + partMap.put("UNIT_QTY", unitQty.trim()); + //비고(REMARK) partMap.put("REMARK", getCellValue(row, columnIndex++, formatter, emptyColCnt)); @@ -3637,12 +3651,14 @@ public class PartMngService extends BaseService { } else { partMap.put("ACCTFG", ""); } - // 조달구분(ODRFG) - 한글명 입력 시 코드값으로 변환 + // 조달구분(ODRFG) - 한글명 입력 시 코드값으로 변환 (0:구매, 1:생산, 8:Phantom) if(!CommonUtils.isBlank(odrfg)){ if("구매".equals(odrfg.trim())){ partMap.put("ODRFG", "0"); } else if("생산".equals(odrfg.trim())){ partMap.put("ODRFG", "1"); + } else if("Phantom".equalsIgnoreCase(odrfg.trim())){ + partMap.put("ODRFG", "8"); } else { partMap.put("ODRFG", odrfg); // 숫자면 그대로 } @@ -3900,9 +3916,10 @@ public class PartMngService extends BaseService { // 1: 모품번(PARENT_PART_NO), 2: 품번(PART_NO), 3: 품명(PART_NAME) // 4: 수량(QTY), 5: 항목수량(ITEM_QTY), 6: 재료(MATERIAL) // 7: 열처리경도(HEAT_TREATMENT_HARDNESS), 8: 열처리방법(HEAT_TREATMENT_METHOD), 9: 표면처리(SURFACE_TREATMENT) - // 10: 공급업체(SUPPLIER), 11: 범주이름(PART_TYPE), 12: 계정구분(ACCTFG), 13: 조달구분(ODRFG) - // 14: 재고단위(UNIT_DC), 15: 관리단위(UNITMANG_DC), 16: 환산수량(UNITCHNG_NB) - // 17: LOT구분(LOT_FG), 18: 사용여부(USE_YN), 19: 검사여부(QC_FG), 20: SET품여부(SETITEM_FG), 21: 의뢰여부(REQ_FG) + // 10: 공급업체(SUPPLIER), 11: 범주이름(PART_TYPE), 12: 규격(SPEC), 13: 계정구분(ACCTFG), 14: 조달구분(ODRFG) + // 15: 재고단위(UNIT_DC), 16: 관리단위(UNITMANG_DC), 17: 환산수량(UNITCHNG_NB) + // 18: LOT구분(LOT_FG), 19: 사용여부(USE_YN), 20: 검사여부(QC_FG), 21: SET품여부(SETITEM_FG), 22: 의뢰여부(REQ_FG) + // 23: 개당길이(UNIT_LENGTH), 24: 개당소요량(UNIT_QTY) String parentPartNo = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // 모품번 String partNo = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // 품번 @@ -3915,6 +3932,7 @@ public class PartMngService extends BaseService { String surfaceTreatment = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // 표면처리 String supplier = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // 공급업체 String partType = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // 범주이름 + String spec = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // 규격 String acctfg = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // 계정구분 String odrfg = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // 조달구분 // ERP 연동 필드 파싱 @@ -3926,6 +3944,8 @@ public class PartMngService extends BaseService { String qcFg = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // 검사여부 String setitemFg = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // SET품여부 String reqFg = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // 의뢰여부 + String unitLength = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // 개당길이 + String unitQty = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // 개당소요량 // 빈 행 체크 if(StringUtils.isBlank(partNo) && StringUtils.isBlank(partName)){ @@ -4043,6 +4063,7 @@ public class PartMngService extends BaseService { partMap.put("SURFACE_TREATMENT", surfaceTreatment); partMap.put("MAKER", makerValue); // MAKER에 저장 partMap.put("PART_TYPE", partTypeCode); + partMap.put("SPEC", spec); // 규격 // 계정구분(ACCTFG) - 한글명 입력 시 코드값으로 변환 if(!StringUtils.isBlank(acctfg)){ if(acctfg.matches("\\d+")) { @@ -4060,12 +4081,14 @@ public class PartMngService extends BaseService { } else { partMap.put("ACCTFG", ""); } - // 조달구분(ODRFG) - 한글명 입력 시 코드값으로 변환 + // 조달구분(ODRFG) - 한글명 입력 시 코드값으로 변환 (0:구매, 1:생산, 8:Phantom) if(!CommonUtils.isBlank(odrfg)){ if("구매".equals(odrfg.trim())){ partMap.put("ODRFG", "0"); } else if("생산".equals(odrfg.trim())){ partMap.put("ODRFG", "1"); + } else if("Phantom".equalsIgnoreCase(odrfg.trim())){ + partMap.put("ODRFG", "8"); } else { partMap.put("ODRFG", odrfg); // 숫자면 그대로 } @@ -4143,6 +4166,10 @@ public class PartMngService extends BaseService { partMap.put("REQ_FG", "0"); } + // 개당길이, 개당소요량 + partMap.put("UNIT_LENGTH", unitLength); + partMap.put("UNIT_QTY", unitQty); + partMap.put("NOTE", noteMsg); if(logging) logger.info("partMap:"+partMap); @@ -4951,6 +4978,9 @@ public class PartMngService extends BaseService { insertMap.put("SETITEM_FG", StringUtils.isBlank(setitemFgVal) ? "0" : setitemFgVal); String reqFgVal = CommonUtils.checkNull((String)insertMap.get("REQ_FG")); insertMap.put("REQ_FG", StringUtils.isBlank(reqFgVal) ? "0" : reqFgVal); + // 개당길이, 개당소요량 + insertMap.put("UNIT_LENGTH", CommonUtils.checkNull((String)insertMap.get("UNIT_LENGTH"))); + insertMap.put("UNIT_QTY", CommonUtils.checkNull((String)insertMap.get("UNIT_QTY"))); insertMap.put("STATUS", "deploy"); // 엑셀 업로드 시 deploy 상태로 저장 insertMap.put("WRITER", CommonUtils.checkNull((String)paramMap.get("CONNECTUSERID")));