V20260210 #158

Merged
hjjeong merged 4 commits from V20260210 into main 2026-03-03 08:18:51 +00:00
14 changed files with 101 additions and 29 deletions

View File

@@ -698,12 +698,7 @@ function fn_initGrid() {
},
formatter: function(cell) {
var value = cell.getValue();
// 저장된 값이 없으면 기본값 '0000008377'(RPS) 설정
if(value === undefined || value === null || value === '') {
value = '0000008377';
cell.getRow().update({PROCESSING_VENDOR: value}, false);
}
if(!value) return '';
// OBJID로 업체명 조회하여 표시
for(var i = 0; i < supplyVendorList.length; i++) {
@@ -950,6 +945,14 @@ function fn_initGrid() {
} else {
row.ORDER_QTY = fn_calcOrderQty(row);
}
// 가공업체 기본값: 값이 없을 때만 적용 (저장된 값은 유지)
if(!row.PROCESSING_VENDOR) {
var partTypeTitle = row.PART_TYPE_TITLE || row.part_type_title || '';
if(partTypeTitle.indexOf('구매품') < 0) {
row.PROCESSING_VENDOR = '0000008377';
}
}
});
return dataList;

View File

@@ -291,14 +291,37 @@ function fn_initGrid() {
field: 'VENDOR_NAME'
});
// 단가 (수정가능)
// 단가 (수정가능 - 클릭 시 전체 선택)
columns.push({
headerHozAlign: 'center',
hozAlign: 'right',
width: 120,
title: '<span style="background-color: #FFFF00; padding: 2px 5px;">단가</span>',
field: 'UNIT_PRICE',
editor: 'number',
editor: function(cell, onRendered, success, cancel) {
var input = document.createElement("input");
input.type = "number";
input.style.width = "100%";
input.style.boxSizing = "border-box";
input.style.textAlign = "right";
input.value = cell.getValue() || '';
onRendered(function() {
input.focus();
input.select();
});
function onComplete() {
var val = input.value;
success(val !== '' ? Number(val) : 0);
}
input.addEventListener("blur", onComplete);
input.addEventListener("keydown", function(e) {
if(e.keyCode === 13) onComplete();
if(e.keyCode === 27) cancel();
});
return input;
},
editable: true,
formatter: function(cell) {
var value = cell.getValue();
@@ -306,14 +329,46 @@ function fn_initGrid() {
}
});
// 입고요청일 (수정가능 - 달력 선택)
// 입고요청일 (수정가능 - datepicker + 복사/붙여넣기 지원)
columns.push({
headerHozAlign: 'center',
hozAlign: 'center',
width: 130,
title: '<span style="background-color: #FFFF00; padding: 2px 5px;">입고요청일</span>',
field: 'DELIVERY_REQUEST_DATE',
editor: 'date',
editor: function(cell, onRendered, success, cancel) {
var input = document.createElement("input");
input.type = "text";
input.style.width = "100%";
input.style.boxSizing = "border-box";
input.style.textAlign = "center";
input.value = cell.getValue() || '';
//input.placeholder = "YYYY-MM-DD";
onRendered(function() {
$(input).datepicker({
dateFormat: 'yy-mm-dd',
changeMonth: true,
changeYear: true,
onSelect: function(dateText) {
success(dateText);
}
});
input.focus();
input.select();
});
input.addEventListener("blur", function() {
if(!$(input).datepicker("widget").is(":visible")) {
success(input.value);
}
});
input.addEventListener("keydown", function(e) {
if(e.keyCode === 13) success(input.value);
if(e.keyCode === 27) cancel();
});
return input;
},
editable: true
});

View File

@@ -9,6 +9,7 @@
*/
package com.pms.ions.itemmgmt.service;
import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.Date;
@@ -155,7 +156,7 @@ public class BomService {
String path = CommonUtils.checkNull(fileMap.get("FILE_PATH"));
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);

View File

@@ -86,7 +86,7 @@ public class ExcelRegInvenService {
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
FormulaEvaluator formulaEval = workBook.getCreationHelper().createFormulaEvaluator();
XSSFSheet sheet = workBook.getSheetAt(0);

View File

@@ -2853,10 +2853,15 @@ private String encodeImageToBase64(String imagePath) {
Map<String, Object> updateParam = new HashMap<String, Object>();
updateParam.putAll(paramMap);
updateParam.put("part_objid", item.get("PART_OBJID"));
updateParam.put("quantity", String.valueOf(itemQuantity));
// Machine인 경우 수량은 변경하지 않음 (프로젝트별 1로 유지)
if(isMachine) {
updateParam.remove("quantity");
} else {
updateParam.put("quantity", String.valueOf(itemQuantity));
}
updateParam.put("due_date", item.get("DUE_DATE"));
System.out.println("프로젝트 업데이트 - PART_OBJID: " + item.get("PART_OBJID") + ", 수량: " + itemQuantity);
System.out.println("프로젝트 업데이트 - PART_OBJID: " + item.get("PART_OBJID") + (isMachine ? ", 수량: 변경안함(Machine)" : ", 수량: " + itemQuantity));
sqlSession.update("project.ModifyProjectByContract", updateParam);
}
}
@@ -3079,10 +3084,15 @@ private String encodeImageToBase64(String imagePath) {
Map<String, Object> updateParam = new HashMap<String, Object>();
updateParam.putAll(paramMap);
updateParam.put("part_objid", item.get("PART_OBJID"));
updateParam.put("quantity", String.valueOf(itemQuantity));
// Machine인 경우 수량은 변경하지 않음 (프로젝트별 1로 유지)
if(isMachine) {
updateParam.remove("quantity");
} else {
updateParam.put("quantity", String.valueOf(itemQuantity));
}
updateParam.put("due_date", item.get("DUE_DATE"));
System.out.println("프로젝트 업데이트 - PART_OBJID: " + item.get("PART_OBJID") + ", 수량: " + itemQuantity);
System.out.println("프로젝트 업데이트 - PART_OBJID: " + item.get("PART_OBJID") + (isMachine ? ", 수량: 변경안함(Machine)" : ", 수량: " + itemQuantity));
sqlSession.update("project.ModifyProjectByContract", updateParam);
}
}

View File

@@ -9,6 +9,7 @@
*/
package com.pms.salesmgmt.service;
import java.io.File;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.Arrays;
@@ -1385,7 +1386,7 @@ public class SalesMngService {
HashMap fileMap = (HashMap)fileList.get(0);
String path = CommonUtils.checkNull(fileMap.get("FILE_PATH"));
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
/*
Workbook workBook = null;

View File

@@ -958,7 +958,7 @@ public class OrderMgmtService {
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
FormulaEvaluator formulaEval = workBook.getCreationHelper().createFormulaEvaluator();
XSSFSheet sheet = workBook.getSheetAt(0);
@@ -1189,7 +1189,7 @@ public class OrderMgmtService {
String path = CommonUtils.checkNull(fileMap.get("FILE_PATH"));
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);
HashMap partMap = new HashMap();

View File

@@ -975,7 +975,7 @@ public class OrderMngService {
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
FormulaEvaluator formulaEval = workBook.getCreationHelper().createFormulaEvaluator();
XSSFSheet sheet = workBook.getSheetAt(0);
@@ -1206,7 +1206,7 @@ public class OrderMngService {
String path = CommonUtils.checkNull(fileMap.get("FILE_PATH"));
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);
HashMap partMap = new HashMap();

View File

@@ -1498,7 +1498,7 @@ public class PartMgmtService {
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
FormulaEvaluator formulaEval = workBook.getCreationHelper().createFormulaEvaluator();
XSSFSheet sheet = workBook.getSheetAt(0);
@@ -2170,7 +2170,7 @@ public class PartMgmtService {
String path = CommonUtils.checkNull(fileMap.get("FILE_PATH"));
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);
HashMap partMap = new HashMap();

View File

@@ -1139,7 +1139,7 @@ public class PartService extends BaseService{
String path = CommonUtils.checkNull(fileMap.get("FILE_PATH"));
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);
@@ -1736,7 +1736,7 @@ public class PartService extends BaseService{
String path = CommonUtils.checkNull(fileMap.get("FILE_PATH"));
String fileName = CommonUtils.checkNull(fileMap.get("SAVED_FILE_NAME"));
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);

View File

@@ -423,7 +423,7 @@ public class ProductMgmtService {
System.out.println("fileName ---------------->"+fileName);
System.out.println("fileName ---------------->"+fileName);
System.out.println("fileName ---------------->"+fileName);
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
FormulaEvaluator formulaEval = workBook.getCreationHelper().createFormulaEvaluator();
XSSFSheet sheet = workBook.getSheetAt(0);

View File

@@ -2788,7 +2788,7 @@ public class ProjectService {
int lastColumnIndex = 2;
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);

View File

@@ -1,5 +1,6 @@
package com.pms.utility;
import java.io.File;
import java.io.FileInputStream;
import java.sql.Connection;
import java.sql.DriverManager;
@@ -58,7 +59,7 @@ public class WBSParsingUtil {
List resultList = new ArrayList();
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);
Connection conn = null;

View File

@@ -1,5 +1,6 @@
package com.pms.utility;
import java.io.File;
import java.io.FileInputStream;
import java.sql.Connection;
import java.sql.DriverManager;
@@ -58,7 +59,7 @@ public class WBSTemplateParser {
List resultList = new ArrayList();
FileInputStream fis = new FileInputStream(path+"\\"+fileName);
FileInputStream fis = new FileInputStream(path + File.separator + fileName);
XSSFWorkbook workBook = new XSSFWorkbook(fis);
XSSFSheet sheet = workBook.getSheetAt(0);
Connection conn = null;