프로젝트 중복 생성 방지!

This commit is contained in:
2026-03-20 10:53:57 +09:00
parent c3cc8eaf99
commit a82b944d5d
2 changed files with 16 additions and 5 deletions

View File

@@ -125,14 +125,21 @@
return data.toString().replace(/,/g, "");
}
var isSaving = false;
function fn_save() {
if(isSaving) return false;
if (fnc_valitate("form1")) {
// 품목 유효성 검사
if(!fn_validateItems()) {
return false;
}
if(confirm("등록하시겠습니까?")) {
isSaving = true;
$("#btnSave").prop("disabled", true);
// 품목 데이터 수집
var itemsData = fn_collectItemsData();
console.log("최종 전송 데이터:", JSON.stringify(itemsData, null, 2));
@@ -163,6 +170,8 @@
},
error : function(jqxhr, status, error) {
alert("저장 중 오류가 발생했습니다.");
isSaving = false;
$("#btnSave").prop("disabled", false);
}
});
}

View File

@@ -2788,9 +2788,10 @@ private String encodeImageToBase64(String imagePath) {
System.out.println("제품구분: Machine(0000928) - 품목별 수량만큼 프로젝트 생성");
}
// 품목별로 프로젝트 생성 또는 업데이트
// 품목별로 프로젝트 생성 또는 업데이트 (같은 트랜잭션의 sqlSession 사용)
paramMap.put("contractObjId", contract_objid);
List<Map> contractItems = getContractItems(paramMap);
List contractItemsRaw = sqlSession.selectList("contractMgmt.getContractItems", paramMap);
List<Map<String, Object>> contractItems = CommonUtils.toUpperCaseMapKey(contractItemsRaw);
if(contractItems != null && !contractItems.isEmpty()) {
System.out.println("품목 개수: " + contractItems.size() + "개 - 프로젝트 " + (hasProject ? "업데이트" : "생성") + " 시작" + (isMachine ? " (Machine - 수량별 생성)" : ""));
@@ -3021,9 +3022,10 @@ private String encodeImageToBase64(String imagePath) {
System.out.println("제품구분: Machine(0000928) - 품목별 수량만큼 프로젝트 생성");
}
// 품목별로 프로젝트 생성 또는 업데이트
// 품목별로 프로젝트 생성 또는 업데이트 (같은 트랜잭션의 sqlSession 사용)
paramMap.put("contractObjId", contract_objid);
List<Map> contractItems = getContractItems(paramMap);
List contractItemsRaw2 = sqlSession.selectList("contractMgmt.getContractItems", paramMap);
List<Map<String, Object>> contractItems = CommonUtils.toUpperCaseMapKey(contractItemsRaw2);
if(contractItems != null && !contractItems.isEmpty()) {
System.out.println("품목 개수: " + contractItems.size() + "개 - 프로젝트 " + (hasProject ? "업데이트" : "생성") + " 시작" + (isMachine ? " (Machine - 수량별 생성)" : ""));