diff --git a/WebContent/WEB-INF/view/partMng/openBomReportExcelImportPopUp.jsp b/WebContent/WEB-INF/view/partMng/openBomReportExcelImportPopUp.jsp
index 3d2e2d7..96aedd3 100644
--- a/WebContent/WEB-INF/view/partMng/openBomReportExcelImportPopUp.jsp
+++ b/WebContent/WEB-INF/view/partMng/openBomReportExcelImportPopUp.jsp
@@ -250,7 +250,8 @@ $(document).ready(function(){
grid = $("#expenseDetailGrid").jqGrid({
url: ""
,datatype: "local"
- ,colNames: ["상태","모품번","품번","품명","수량","항목수량","재료","열처리경도","열처리방법","표면처리","메이커","범주이름","계정구분","조달구분"]
+ ,colNames: ["상태","모품번","품번","품명","수량","항목수량","재료","열처리경도","열처리방법","표면처리","메이커","범주이름","규격","계정구분","조달구분",
+ "재고단위","관리단위","환산수량","LOT구분","사용여부","검사여부","SET품여부","의뢰여부","개당길이","개당소요량"]
,colModel: [
{name:"NOTE",index:"NOTE", width: 200, align:"center", hidden: false, sortable:false, editable:true
,editoptions:{
@@ -354,6 +355,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"
@@ -369,13 +377,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;
+ }
+ }
+ }
]
//,cellEdit : true
//,cellsubmit : "clientArray"
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 62dde9a..3f7b38d 100644
--- a/WebContent/WEB-INF/view/partMng/partMngDetailPopUp.jsp
+++ b/WebContent/WEB-INF/view/partMng/partMngDetailPopUp.jsp
@@ -84,7 +84,7 @@ $(document).ready(function(){
fn_setReadOnly();
- window.resizeTo(820,750);
+ window.resizeTo(820,930);
});
@@ -318,8 +318,19 @@ function fn_enableEdit(){
$('#SURFACE_TREATMENT').prop('readonly', false).prop('disabled', false);
$('#MAKER').prop('readonly', false).prop('disabled', false);
$('#PART_TYPE').prop('disabled', false);
+ $('#SPEC').prop('readonly', false).prop('disabled', false);
$('#ACCTFG').prop('disabled', false);
$('#ODRFG').prop('disabled', false);
+ $('#UNIT_DC').prop('readonly', false).prop('disabled', false);
+ $('#UNITMANG_DC').prop('readonly', false).prop('disabled', false);
+ $('#UNITCHNG_NB').prop('readonly', false).prop('disabled', false);
+ $('#LOT_FG').prop('disabled', false);
+ $('#USE_YN').prop('disabled', false);
+ $('#QC_FG').prop('disabled', false);
+ $('#SETITEM_FG').prop('disabled', false);
+ $('#REQ_FG').prop('disabled', false);
+ $('#UNIT_LENGTH').prop('readonly', false).prop('disabled', false);
+ $('#UNIT_QTY').prop('readonly', false).prop('disabled', false);
$('#REMARK').prop('readonly', false).prop('disabled', false);
// 버튼 표시 변경
@@ -328,40 +339,48 @@ function fn_enableEdit(){
$('#btnCancel').show();
}
+// 숫자 검증 함수
+function isNumeric(value){
+ if(value == null || value == '') return true; // 빈 값은 허용
+ return /^[0-9]*\.?[0-9]*$/.test(value);
+}
+
// 저장 기능
function fn_save(){
+ // 필수값 검증
+ if(!fnc_validate("form1")){
+ return;
+ }
+
+ // 숫자 필드 검증
+ var unitchngNb = $('#UNITCHNG_NB').val();
+ if(!isNumeric(unitchngNb)){
+ alert("환산수량은 숫자만 입력 가능합니다.");
+ $('#UNITCHNG_NB').focus();
+ return;
+ }
+ var unitLength = $('#UNIT_LENGTH').val();
+ if(!isNumeric(unitLength)){
+ alert("개당길이는 숫자만 입력 가능합니다.");
+ $('#UNIT_LENGTH').focus();
+ return;
+ }
+ var unitQty = $('#UNIT_QTY').val();
+ if(!isNumeric(unitQty)){
+ alert("개당소요량은 숫자만 입력 가능합니다.");
+ $('#UNIT_QTY').focus();
+ return;
+ }
+
if(!confirm("저장하시겠습니까?")){
return;
}
- // 유효성 검사
- var partName = $('#PART_NAME').val();
- if(!partName || partName.trim() == ""){
- alert("품명을 입력해주세요.");
- $('#PART_NAME').focus();
- return;
- }
-
- // 저장할 데이터 준비
- var saveData = {
- OBJID: $('#OBJID').val(),
- PART_NAME: $('#PART_NAME').val(),
- MATERIAL: $('#MATERIAL').val(),
- HEAT_TREATMENT_HARDNESS: $('#HEAT_TREATMENT_HARDNESS').val(),
- HEAT_TREATMENT_METHOD: $('#HEAT_TREATMENT_METHOD').val(),
- SURFACE_TREATMENT: $('#SURFACE_TREATMENT').val(),
- MAKER: $('#MAKER').val(),
- PART_TYPE: $('#PART_TYPE').val(),
- ACCTFG: $('#ACCTFG').val(),
- ODRFG: $('#ODRFG').val(),
- REMARK: $('#REMARK').val()
- };
-
// 저장 요청
$.ajax({
url: "/partMng/updatePartDetail.do",
type: "POST",
- data: saveData,
+ data: $("#form1").serialize(),
dataType: "json",
success: function(data){
if(data.result == "success"){
@@ -539,7 +558,7 @@ section {
|
-
+
|
@@ -557,24 +576,125 @@ section {
|
+
+ |
+
+ |
+
+
+ |
+
|
|
-
+
|
|
- |
+
+
+ |
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+ |
+
+ |
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+ |
+
+ |
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+ |
+
+
+ |
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
|
diff --git a/WebContent/WEB-INF/view/partMng/partMngFormPopUp.jsp b/WebContent/WEB-INF/view/partMng/partMngFormPopUp.jsp
index d063eaf..169eed2 100644
--- a/WebContent/WEB-INF/view/partMng/partMngFormPopUp.jsp
+++ b/WebContent/WEB-INF/view/partMng/partMngFormPopUp.jsp
@@ -61,13 +61,13 @@ $(document).ready(function(){
if('changeDesign' == '${param.ACTION_TYPE}'){
//alert('c');
- window.resizeTo(800,750);
+ window.resizeTo(800,850);
//fnc_datepick();
}else if(fnc_isEmpty('${param.ACTION_TYPE}')){
- window.resizeTo(800,720);
+ window.resizeTo(800,850);
//alert('r');
}else{//수정
- window.resizeTo(800,760);
+ window.resizeTo(800,850);
//alert('e');
}
});
@@ -204,16 +204,33 @@ function fileDelete(fileObjId,areaId){
}
}
+// 숫자 검증 함수
+function isNumeric(value){
+ if(value == null || value == '') return true; // 빈 값은 허용
+ return /^[0-9]*\.?[0-9]*$/.test(value);
+}
+
function fn_save(){
- //var CHANGE_OPTION_Arr = new Array();
- // $('input:checkbox[name="CHANGE_OPTION"]').each(function() {
- // if(this.checked){//checked 처리된 항목의 값
- // CHANGE_OPTION_Arr.push(this.value);
- // }
- // });
- // $("#CHANGE_OPTION_Arr").val(CHANGE_OPTION_Arr);
-
-
+ // 숫자 필드 검증
+ var unitchngNb = $('#UNITCHNG_NB').val();
+ if(!isNumeric(unitchngNb)){
+ alert("환산수량은 숫자만 입력 가능합니다.");
+ $('#UNITCHNG_NB').focus();
+ return;
+ }
+ var unitLength = $('#UNIT_LENGTH').val();
+ if(!isNumeric(unitLength)){
+ alert("개당길이는 숫자만 입력 가능합니다.");
+ $('#UNIT_LENGTH').focus();
+ return;
+ }
+ var unitQty = $('#UNIT_QTY').val();
+ if(!isNumeric(unitQty)){
+ alert("개당소요량은 숫자만 입력 가능합니다.");
+ $('#UNIT_QTY').focus();
+ return;
+ }
+
if(fnc_validate('form1')){
if(fn_overlapPartMng()){
if(confirm("저장하시겠습니까?")){
@@ -314,13 +331,13 @@ function fn_overlapPartMng(){
|
-
+
|
|
-
+
|
@@ -356,7 +373,7 @@ function fn_overlapPartMng(){
|
-
+
|
@@ -371,28 +388,130 @@ 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 768c82f..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' }
];
@@ -213,7 +216,7 @@ ui-jqgrid tr.jqgrow td {
var target = "partMngPopUp";
- window.open(url,target,"width=600, height=900, menubars=no, scrollbars=yes, resizable=yes");
+ window.open(url,target,"width=600, height=1200, menubars=no, scrollbars=yes, resizable=yes");
hiddenForm.action = url;
hiddenForm.OBJID.value = objId;
diff --git a/WebContent/WEB-INF/view/productionplanning/mBomPopupRight.jsp b/WebContent/WEB-INF/view/productionplanning/mBomPopupRight.jsp
index 50474ff..71aa334 100644
--- a/WebContent/WEB-INF/view/productionplanning/mBomPopupRight.jsp
+++ b/WebContent/WEB-INF/view/productionplanning/mBomPopupRight.jsp
@@ -138,8 +138,8 @@ function initEbomTable() {
function fn_searchEbom() {
var partNo = $("#search_part_no").val().trim();
var partName = $("#search_part_name").val().trim();
- var material = $("#search_material").val().trim();
- var supplier = $("#search_supplier").val().trim();
+ var material = ($("#search_material").val() || '').trim();
+ var supplier = ($("#search_supplier").val() || '').trim();
$.ajax({
url: "/partMng/getPartMngList_ajax.do",
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 7d504a6..50f0d6d 100644
--- a/src/com/pms/mapper/partMng.xml
+++ b/src/com/pms/mapper/partMng.xml
@@ -158,7 +158,24 @@
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,
COALESCE(FILE_CNT.CU02_CNT, 0) CU02_CNT,
COALESCE(FILE_CNT.CU03_CNT, 0) CU03_CNT,
@@ -659,7 +676,17 @@
HEAT_TREATMENT_METHOD,
SURFACE_TREATMENT,
ACCTFG,
- ODRFG
+ ODRFG,
+ UNIT_DC,
+ UNITMANG_DC,
+ UNITCHNG_NB,
+ LOT_FG,
+ USE_YN,
+ QC_FG,
+ SETITEM_FG,
+ REQ_FG,
+ UNIT_LENGTH,
+ UNIT_QTY
) VALUES (
#{OBJID}::NUMERIC,
#{PRODUCT_MGMT_OBJID},
@@ -707,7 +734,17 @@
#{HEAT_TREATMENT_METHOD},
#{SURFACE_TREATMENT},
#{ACCTFG},
- #{ODRFG}
+ #{ODRFG},
+ #{UNIT_DC},
+ #{UNITMANG_DC},
+ #{UNITCHNG_NB}::NUMERIC,
+ COALESCE(#{LOT_FG}, '0'),
+ COALESCE(#{USE_YN}, '1'),
+ COALESCE(#{QC_FG}, '0'),
+ COALESCE(#{SETITEM_FG}, '0'),
+ COALESCE(#{REQ_FG}, '0'),
+ #{UNIT_LENGTH},
+ #{UNIT_QTY}
) ON
CONFLICT (OBJID) DO
UPDATE
@@ -753,7 +790,17 @@
HEAT_TREATMENT_METHOD = #{HEAT_TREATMENT_METHOD},
SURFACE_TREATMENT = #{SURFACE_TREATMENT},
ACCTFG = #{ACCTFG},
- ODRFG = #{ODRFG}
+ ODRFG = #{ODRFG},
+ UNIT_DC = #{UNIT_DC},
+ UNITMANG_DC = #{UNITMANG_DC},
+ UNITCHNG_NB = #{UNITCHNG_NB}::NUMERIC,
+ LOT_FG = COALESCE(#{LOT_FG}, PART_MNG.LOT_FG),
+ USE_YN = COALESCE(#{USE_YN}, PART_MNG.USE_YN),
+ QC_FG = COALESCE(#{QC_FG}, PART_MNG.QC_FG),
+ SETITEM_FG = COALESCE(#{SETITEM_FG}, PART_MNG.SETITEM_FG),
+ REQ_FG = COALESCE(#{REQ_FG}, PART_MNG.REQ_FG),
+ UNIT_LENGTH = #{UNIT_LENGTH},
+ UNIT_QTY = #{UNIT_QTY}
@@ -2669,6 +2716,17 @@ SELECT T1.LEV, T1.BOM_REPORT_OBJID, T1.ROOT_PART_NO, T1.PATH, T1.LEAF, T2.*
PART_TYPE = #{PART_TYPE},
ACCTFG = #{ACCTFG},
ODRFG = #{ODRFG},
+ SPEC = #{SPEC},
+ UNIT_DC = #{UNIT_DC},
+ UNITMANG_DC = #{UNITMANG_DC},
+ UNITCHNG_NB = #{UNITCHNG_NB}::NUMERIC,
+ LOT_FG = #{LOT_FG},
+ USE_YN = #{USE_YN},
+ QC_FG = #{QC_FG},
+ SETITEM_FG = #{SETITEM_FG},
+ REQ_FG = #{REQ_FG},
+ UNIT_LENGTH = #{UNIT_LENGTH},
+ UNIT_QTY = #{UNIT_QTY},
REMARK = #{REMARK},
EDIT_DATE = NOW()
WHERE OBJID = #{OBJID}
@@ -7476,6 +7534,16 @@ SELECT T1.LEV, T1.BOM_REPORT_OBJID, T1.ROOT_PART_NO, T1.PATH, T1.LEAF, T2.*
,SURFACE_TREATMENT
,ACCTFG
,ODRFG
+ ,UNIT_DC
+ ,UNITMANG_DC
+ ,UNITCHNG_NB
+ ,LOT_FG
+ ,USE_YN
+ ,QC_FG
+ ,SETITEM_FG
+ ,REQ_FG
+ ,UNIT_LENGTH
+ ,UNIT_QTY
) VALUES (
#{PART_OBJID}::NUMERIC
,#{PART_NO}
@@ -7506,6 +7574,16 @@ SELECT T1.LEV, T1.BOM_REPORT_OBJID, T1.ROOT_PART_NO, T1.PATH, T1.LEAF, T2.*
,#{SURFACE_TREATMENT}
,#{ACCTFG}
,#{ODRFG}
+ ,#{UNIT_DC}
+ ,#{UNITMANG_DC}
+ ,#{UNITCHNG_NB}::NUMERIC
+ ,COALESCE(#{LOT_FG}, '0')
+ ,COALESCE(#{USE_YN}, '1')
+ ,COALESCE(#{QC_FG}, '0')
+ ,COALESCE(#{SETITEM_FG}, '0')
+ ,COALESCE(#{REQ_FG}, '0')
+ ,#{UNIT_LENGTH}
+ ,#{UNIT_QTY}
)
@@ -8179,7 +8257,15 @@ SELECT PM.OBJID
PART_NAME,
SPEC,
acctfg,
- odrfg
+ odrfg,
+ UNIT_DC,
+ UNITMANG_DC,
+ UNITCHNG_NB,
+ LOT_FG,
+ USE_YN,
+ QC_FG,
+ SETITEM_FG,
+ REQ_FG
FROM PART_MNG
WHERE STATUS = 'release'
AND PART_NO IS NOT NULL
@@ -8195,7 +8281,15 @@ SELECT PM.OBJID
PART_NAME,
SPEC,
acctfg,
- odrfg
+ odrfg,
+ UNIT_DC,
+ UNITMANG_DC,
+ UNITCHNG_NB,
+ LOT_FG,
+ USE_YN,
+ QC_FG,
+ SETITEM_FG,
+ REQ_FG
FROM PART_MNG
WHERE OBJID = #{objid}
diff --git a/src/com/pms/service/BatchService.java b/src/com/pms/service/BatchService.java
index 1b3bc7d..82b9dc0 100644
--- a/src/com/pms/service/BatchService.java
+++ b/src/com/pms/service/BatchService.java
@@ -1291,19 +1291,30 @@ public class BatchService extends BaseService {
String odrFg = CommonUtils.checkNull(part.get("odrfg"));
String itemDc = CommonUtils.checkNull(part.get("spec"));
- // 하드코딩 고정값
- String coCd = "1000"; // 회사코드
- String unitDc = "1"; // 단위
- String unitmangDc = "1"; // 단위관리
- int unitchngNb = 1; // 단위변환
- String lotFg = "0"; // LOT구분
- String qcFg = "0"; // 검사구분
- String reqFg = "0"; // 청구구분
- String setitemFg = "0"; // 세트품목구분
- String useYn = "1"; // 사용여부
+ // 회사코드 고정값
+ String coCd = "1000";
+ // DB에서 가져온 ERP 연동 필드
+ String unitDc = CommonUtils.checkNull(part.get("unit_dc"));
+ String unitmangDc = CommonUtils.checkNull(part.get("unitmang_dc"));
+ String unitchngNbStr = CommonUtils.checkNull(part.get("unitchng_nb"));
+ int unitchngNb = 0;
+ try {
+ if (!unitchngNbStr.isEmpty()) {
+ unitchngNb = (int) Double.parseDouble(unitchngNbStr);
+ }
+ } catch (Exception e) {
+ // 변환 실패 시 0 유지
+ }
+ String lotFg = CommonUtils.checkNull(part.get("lot_fg"));
+ String qcFg = CommonUtils.checkNull(part.get("qc_fg"));
+ String reqFg = CommonUtils.checkNull(part.get("req_fg"));
+ String setitemFg = CommonUtils.checkNull(part.get("setitem_fg"));
+ String useYn = CommonUtils.checkNull(part.get("use_yn"));
- // 필수값 체크
- if (itemCd.isEmpty() || itemNm.isEmpty()) {
+ // 필수값 체크 - 모든 필수 필드가 있어야 ERP 전송
+ if (itemCd.isEmpty() || itemNm.isEmpty() || acctFg.isEmpty() || odrFg.isEmpty() ||
+ unitDc.isEmpty() || unitmangDc.isEmpty() || unitchngNb == 0 ||
+ lotFg.isEmpty() || qcFg.isEmpty() || reqFg.isEmpty() || setitemFg.isEmpty() || useYn.isEmpty()) {
failCount++;
continue;
}
@@ -1388,28 +1399,71 @@ public class BatchService extends BaseService {
String odrFg = CommonUtils.checkNull(part.get("odrfg"));
String itemDc = CommonUtils.checkNull(part.get("spec"));
- // 하드코딩 고정값
- String coCd = "1000"; // 회사코드
- String unitDc = "1"; // 단위
- String unitmangDc = "1"; // 단위관리
- int unitchngNb = 1; // 단위변환
- String lotFg = "0"; // LOT구분
- String qcFg = "0"; // 검사구분
- String reqFg = "0"; // 청구구분
- String setitemFg = "0"; // 세트품목구분
- String useYn = "1"; // 사용여부
+ // 회사코드 고정값
+ String coCd = "1000";
+ // DB에서 가져온 ERP 연동 필드
+ String unitDc = CommonUtils.checkNull(part.get("unit_dc"));
+ String unitmangDc = CommonUtils.checkNull(part.get("unitmang_dc"));
+ String unitchngNbStr = CommonUtils.checkNull(part.get("unitchng_nb"));
+ int unitchngNb = 0;
+ try {
+ if (!unitchngNbStr.isEmpty()) {
+ unitchngNb = (int) Double.parseDouble(unitchngNbStr);
+ }
+ } catch (Exception e) {
+ // 변환 실패 시 0 유지
+ }
+ String lotFg = CommonUtils.checkNull(part.get("lot_fg"));
+ String qcFg = CommonUtils.checkNull(part.get("qc_fg"));
+ String reqFg = CommonUtils.checkNull(part.get("req_fg"));
+ String setitemFg = CommonUtils.checkNull(part.get("setitem_fg"));
+ String useYn = CommonUtils.checkNull(part.get("use_yn"));
- // 필수값 체크
+ // 필수값 체크 - 모든 필수 필드가 있어야 ERP 전송
if (itemCd.isEmpty() || itemNm.isEmpty()) {
result.put("success", false);
result.put("message", "품번 또는 품명이 없습니다.");
return result;
}
+ if (acctFg.isEmpty() || odrFg.isEmpty()) {
+ result.put("success", false);
+ result.put("message", "계정구분 또는 조달구분이 없습니다.");
+ return result;
+ }
+ if (unitDc.isEmpty() || unitmangDc.isEmpty() || unitchngNb == 0) {
+ result.put("success", false);
+ result.put("message", "재고단위, 관리단위, 환산수량이 없습니다.");
+ return result;
+ }
+ if (lotFg.isEmpty() || qcFg.isEmpty() || reqFg.isEmpty() || setitemFg.isEmpty() || useYn.isEmpty()) {
+ result.put("success", false);
+ result.put("message", "LOT구분, 검사여부, 의뢰여부, SET품여부, 사용여부가 없습니다.");
+ return result;
+ }
+
+ // 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("=============================");
- // ERP로 전송
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 aa59002..6ea7a97 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,19 +3089,109 @@ 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); // 숫자면 그대로
}
} else {
partMap.put("ODRFG", "");
}
+ // ERP 연동 필드 파싱
+ String unitDc = getCellValue(row, columnIndex++, formatter, emptyColCnt);
+ partMap.put("UNIT_DC", unitDc.trim());
+
+ String unitmangDc = getCellValue(row, columnIndex++, formatter, emptyColCnt);
+ partMap.put("UNITMANG_DC", unitmangDc.trim());
+
+ String unitchngNb = getCellValue(row, columnIndex++, formatter, emptyColCnt);
+ partMap.put("UNITCHNG_NB", unitchngNb.trim());
+
+ // LOT구분 - 한글명 입력 시 코드값으로 변환
+ String lotFg = getCellValue(row, columnIndex++, formatter, emptyColCnt);
+ if(!CommonUtils.isBlank(lotFg)){
+ if("사용".equals(lotFg.trim())){
+ partMap.put("LOT_FG", "1");
+ } else if("미사용".equals(lotFg.trim())){
+ partMap.put("LOT_FG", "0");
+ } else {
+ partMap.put("LOT_FG", lotFg.trim());
+ }
+ } else {
+ partMap.put("LOT_FG", "0");
+ }
+
+ // 사용여부 - 한글명 입력 시 코드값으로 변환
+ String useYn = getCellValue(row, columnIndex++, formatter, emptyColCnt);
+ if(!CommonUtils.isBlank(useYn)){
+ if("사용".equals(useYn.trim())){
+ partMap.put("USE_YN", "1");
+ } else if("미사용".equals(useYn.trim())){
+ partMap.put("USE_YN", "0");
+ } else {
+ partMap.put("USE_YN", useYn.trim());
+ }
+ } else {
+ partMap.put("USE_YN", "1");
+ }
+
+ // 검사여부 - 한글명 입력 시 코드값으로 변환
+ String qcFg = getCellValue(row, columnIndex++, formatter, emptyColCnt);
+ if(!CommonUtils.isBlank(qcFg)){
+ if("검사".equals(qcFg.trim())){
+ partMap.put("QC_FG", "1");
+ } else if("무검사".equals(qcFg.trim())){
+ partMap.put("QC_FG", "0");
+ } else {
+ partMap.put("QC_FG", qcFg.trim());
+ }
+ } else {
+ partMap.put("QC_FG", "0");
+ }
+
+ // SET품여부 - 한글명 입력 시 코드값으로 변환
+ String setitemFg = getCellValue(row, columnIndex++, formatter, emptyColCnt);
+ if(!CommonUtils.isBlank(setitemFg)){
+ if("여".equals(setitemFg.trim())){
+ partMap.put("SETITEM_FG", "1");
+ } else if("부".equals(setitemFg.trim())){
+ partMap.put("SETITEM_FG", "0");
+ } else {
+ partMap.put("SETITEM_FG", setitemFg.trim());
+ }
+ } else {
+ partMap.put("SETITEM_FG", "0");
+ }
+
+ // 의뢰여부 - 한글명 입력 시 코드값으로 변환
+ String reqFg = getCellValue(row, columnIndex++, formatter, emptyColCnt);
+ if(!CommonUtils.isBlank(reqFg)){
+ if("여".equals(reqFg.trim())){
+ partMap.put("REQ_FG", "1");
+ } else if("부".equals(reqFg.trim())){
+ partMap.put("REQ_FG", "0");
+ } else {
+ partMap.put("REQ_FG", reqFg.trim());
+ }
+ } else {
+ 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));
@@ -3433,9 +3527,21 @@ public class PartMngService extends BaseService {
String surfaceTreatment = getCsvValue(values, colIndex++, emptyColCnt); // 8: 표면처리
String supplier = getCsvValue(values, colIndex++, emptyColCnt); // 9: 공급업체
String partType = getCsvValue(values, colIndex++, emptyColCnt); // 10: 범주이름
- // 계정구분/조달구분은 CSV에 있을 수도 없을 수도 있음
- String acctfg = colIndex < values.length ? getCsvValue(values, colIndex++, emptyColCnt) : ""; // 11: 계정구분
- String odrfg = colIndex < values.length ? getCsvValue(values, colIndex++, emptyColCnt) : ""; // 12: 조달구분
+ // CSV 컬럼 순서: 11: 규격, 12: 계정구분, 13: 조달구분, 14: 재고단위, 15: 관리단위, 16: 환산수량
+ // 17: LOT구분, 18: 사용여부, 19: 검사여부, 20: SET품여부, 21: 의뢰여부, 22: 개당길이, 23: 개당소요량
+ String spec = colIndex < values.length ? getCsvValue(values, colIndex++, emptyColCnt) : ""; // 11: 규격
+ String acctfg = colIndex < values.length ? getCsvValue(values, colIndex++, emptyColCnt) : ""; // 12: 계정구분
+ String odrfg = colIndex < values.length ? getCsvValue(values, colIndex++, emptyColCnt) : ""; // 13: 조달구분
+ String unitDc = colIndex < values.length ? getCsvValue(values, colIndex++, emptyColCnt) : ""; // 14: 재고단위
+ String unitmangDc = colIndex < values.length ? getCsvValue(values, colIndex++, emptyColCnt) : ""; // 15: 관리단위
+ String unitchngNb = colIndex < values.length ? getCsvValue(values, colIndex++, emptyColCnt) : ""; // 16: 환산수량
+ String lotFg = colIndex < values.length ? getCsvValue(values, colIndex++, emptyColCnt) : ""; // 17: LOT구분
+ String useYn = colIndex < values.length ? getCsvValue(values, colIndex++, emptyColCnt) : ""; // 18: 사용여부
+ String qcFg = colIndex < values.length ? getCsvValue(values, colIndex++, emptyColCnt) : ""; // 19: 검사여부
+ String setitemFg = colIndex < values.length ? getCsvValue(values, colIndex++, emptyColCnt) : ""; // 20: SET품여부
+ String reqFg = colIndex < values.length ? getCsvValue(values, colIndex++, emptyColCnt) : ""; // 21: 의뢰여부
+ String unitLength = colIndex < values.length ? getCsvValue(values, colIndex++, emptyColCnt) : ""; // 22: 개당길이
+ String unitQty = colIndex < values.length ? getCsvValue(values, colIndex++, emptyColCnt) : ""; // 23: 개당소요량
// 수준으로부터 부모 품번 찾기
String parentPartNo = "";
@@ -3540,6 +3646,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.trim()); // 규격
// 계정구분(ACCTFG) - 한글명 입력 시 코드값으로 변환
if(!StringUtils.isBlank(acctfg)){
if(acctfg.matches("\\d+")) {
@@ -3557,18 +3664,87 @@ 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); // 숫자면 그대로
}
} else {
partMap.put("ODRFG", "");
}
+ // ERP 연동 필드
+ partMap.put("UNIT_DC", unitDc.trim());
+ partMap.put("UNITMANG_DC", unitmangDc.trim());
+ partMap.put("UNITCHNG_NB", unitchngNb.trim());
+ // LOT구분 - 한글명 입력 시 코드값으로 변환 (0:미사용, 1:사용)
+ if(!CommonUtils.isBlank(lotFg)){
+ if("사용".equals(lotFg.trim())){
+ partMap.put("LOT_FG", "1");
+ } else if("미사용".equals(lotFg.trim())){
+ partMap.put("LOT_FG", "0");
+ } else {
+ partMap.put("LOT_FG", lotFg.trim());
+ }
+ } else {
+ partMap.put("LOT_FG", "");
+ }
+ // 사용여부 - 한글명 입력 시 코드값으로 변환 (0:미사용, 1:사용)
+ if(!CommonUtils.isBlank(useYn)){
+ if("사용".equals(useYn.trim())){
+ partMap.put("USE_YN", "1");
+ } else if("미사용".equals(useYn.trim())){
+ partMap.put("USE_YN", "0");
+ } else {
+ partMap.put("USE_YN", useYn.trim());
+ }
+ } else {
+ partMap.put("USE_YN", "");
+ }
+ // 검사여부 - 한글명 입력 시 코드값으로 변환 (0:무검사, 1:검사)
+ if(!CommonUtils.isBlank(qcFg)){
+ if("검사".equals(qcFg.trim())){
+ partMap.put("QC_FG", "1");
+ } else if("무검사".equals(qcFg.trim())){
+ partMap.put("QC_FG", "0");
+ } else {
+ partMap.put("QC_FG", qcFg.trim());
+ }
+ } else {
+ partMap.put("QC_FG", "");
+ }
+ // SET품여부 - 한글명 입력 시 코드값으로 변환 (0:부, 1:여)
+ if(!CommonUtils.isBlank(setitemFg)){
+ if("여".equals(setitemFg.trim())){
+ partMap.put("SETITEM_FG", "1");
+ } else if("부".equals(setitemFg.trim())){
+ partMap.put("SETITEM_FG", "0");
+ } else {
+ partMap.put("SETITEM_FG", setitemFg.trim());
+ }
+ } else {
+ partMap.put("SETITEM_FG", "");
+ }
+ // 의뢰여부 - 한글명 입력 시 코드값으로 변환 (0:부, 1:여)
+ if(!CommonUtils.isBlank(reqFg)){
+ if("여".equals(reqFg.trim())){
+ partMap.put("REQ_FG", "1");
+ } else if("부".equals(reqFg.trim())){
+ partMap.put("REQ_FG", "0");
+ } else {
+ partMap.put("REQ_FG", reqFg.trim());
+ }
+ } else {
+ partMap.put("REQ_FG", "");
+ }
+ // 개당길이, 개당소요량
+ partMap.put("UNIT_LENGTH", unitLength.trim());
+ partMap.put("UNIT_QTY", unitQty.trim());
partMap.put("NOTE", noteMsg);
if(!StringUtils.isBlank(noteMsg) || emptyColCnt.intValue() < 9) {
@@ -3820,7 +3996,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)
+ // 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(); // 품번
@@ -3833,8 +4012,20 @@ 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 연동 필드 파싱
+ String unitDc = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // 재고단위
+ String unitmangDc = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // 관리단위
+ String unitchngNb = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // 환산수량
+ String lotFg = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // LOT구분
+ String useYn = getCellValue(row, columnIndex++, formatter, emptyColCnt).trim(); // 사용여부
+ 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)){
@@ -3952,6 +4143,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+")) {
@@ -3969,18 +4161,95 @@ 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); // 숫자면 그대로
}
} else {
partMap.put("ODRFG", "");
}
+
+ // ERP 연동 필드
+ partMap.put("UNIT_DC", unitDc);
+ partMap.put("UNITMANG_DC", unitmangDc);
+ partMap.put("UNITCHNG_NB", unitchngNb);
+
+ // LOT구분 - 한글명 입력 시 코드값으로 변환
+ if(!StringUtils.isBlank(lotFg)){
+ if("사용".equals(lotFg.trim())){
+ partMap.put("LOT_FG", "1");
+ } else if("미사용".equals(lotFg.trim())){
+ partMap.put("LOT_FG", "0");
+ } else {
+ partMap.put("LOT_FG", lotFg);
+ }
+ } else {
+ partMap.put("LOT_FG", "0");
+ }
+
+ // 사용여부 - 한글명 입력 시 코드값으로 변환
+ if(!StringUtils.isBlank(useYn)){
+ if("사용".equals(useYn.trim())){
+ partMap.put("USE_YN", "1");
+ } else if("미사용".equals(useYn.trim())){
+ partMap.put("USE_YN", "0");
+ } else {
+ partMap.put("USE_YN", useYn);
+ }
+ } else {
+ partMap.put("USE_YN", "1");
+ }
+
+ // 검사여부 - 한글명 입력 시 코드값으로 변환
+ if(!StringUtils.isBlank(qcFg)){
+ if("검사".equals(qcFg.trim())){
+ partMap.put("QC_FG", "1");
+ } else if("무검사".equals(qcFg.trim())){
+ partMap.put("QC_FG", "0");
+ } else {
+ partMap.put("QC_FG", qcFg);
+ }
+ } else {
+ partMap.put("QC_FG", "0");
+ }
+
+ // SET품여부 - 한글명 입력 시 코드값으로 변환
+ if(!StringUtils.isBlank(setitemFg)){
+ if("여".equals(setitemFg.trim())){
+ partMap.put("SETITEM_FG", "1");
+ } else if("부".equals(setitemFg.trim())){
+ partMap.put("SETITEM_FG", "0");
+ } else {
+ partMap.put("SETITEM_FG", setitemFg);
+ }
+ } else {
+ partMap.put("SETITEM_FG", "0");
+ }
+
+ // 의뢰여부 - 한글명 입력 시 코드값으로 변환
+ if(!StringUtils.isBlank(reqFg)){
+ if("여".equals(reqFg.trim())){
+ partMap.put("REQ_FG", "1");
+ } else if("부".equals(reqFg.trim())){
+ partMap.put("REQ_FG", "0");
+ } else {
+ partMap.put("REQ_FG", reqFg);
+ }
+ } else {
+ 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);
@@ -4775,6 +5044,23 @@ public class PartMngService extends BaseService {
// 계정구분, 조달구분
insertMap.put("ACCTFG", CommonUtils.checkNull((String)insertMap.get("ACCTFG")));
insertMap.put("ODRFG", CommonUtils.checkNull((String)insertMap.get("ODRFG")));
+ // ERP 연동 필드
+ insertMap.put("UNIT_DC", CommonUtils.checkNull((String)insertMap.get("UNIT_DC")));
+ insertMap.put("UNITMANG_DC", CommonUtils.checkNull((String)insertMap.get("UNITMANG_DC")));
+ insertMap.put("UNITCHNG_NB", CommonUtils.checkNull((String)insertMap.get("UNITCHNG_NB")));
+ String lotFgVal = CommonUtils.checkNull((String)insertMap.get("LOT_FG"));
+ insertMap.put("LOT_FG", StringUtils.isBlank(lotFgVal) ? "0" : lotFgVal);
+ String useYnVal = CommonUtils.checkNull((String)insertMap.get("USE_YN"));
+ insertMap.put("USE_YN", StringUtils.isBlank(useYnVal) ? "1" : useYnVal);
+ String qcFgVal = CommonUtils.checkNull((String)insertMap.get("QC_FG"));
+ insertMap.put("QC_FG", StringUtils.isBlank(qcFgVal) ? "0" : qcFgVal);
+ String setitemFgVal = CommonUtils.checkNull((String)insertMap.get("SETITEM_FG"));
+ 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")));