- ObpPartnerCodeService 및 관련 컨트롤러 메서드 제거 - JSP에서 OBP 조회 버튼 및 관련 스크립트 제거
This commit is contained in:
@@ -404,47 +404,6 @@
|
||||
downloadFile(fileId, '1'); // fileSn은 '1'로 가정
|
||||
});
|
||||
|
||||
// OBP 파트너코드 조회 버튼 클릭
|
||||
$("#btn_query_obp").click(function() {
|
||||
var compRegNo = $("#compRegNo").val();
|
||||
if (!compRegNo) {
|
||||
jSuites.notification({ name: '알림', message: '사업자등록번호를 먼저 입력해주세요.', error: true });
|
||||
$("#compRegNo").focus();
|
||||
return;
|
||||
}
|
||||
|
||||
// 하이픈 제거
|
||||
compRegNo = compRegNo.replace(/-/g, '');
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
dataType: "json",
|
||||
data: {
|
||||
cmd: 'QUERY_OBP_PARTNER_CODE',
|
||||
compRegNo: compRegNo
|
||||
},
|
||||
beforeSend: function() {
|
||||
$("#btn_query_obp").prop("disabled", true).html('<i class="material-icons">hourglass_empty</i> 조회중...');
|
||||
},
|
||||
success: function(json) {
|
||||
if (json.success) {
|
||||
$("#orgCode").val(json.partnerCode);
|
||||
jSuites.notification({ name: '성공', message: '파트너코드가 조회되었습니다: ' + json.partnerCode });
|
||||
} else {
|
||||
jSuites.notification({ name: '실패', message: json.message, error: true });
|
||||
}
|
||||
},
|
||||
error: function(e) {
|
||||
jSuites.notification({ name: '오류', message: '파트너코드 조회 중 오류가 발생했습니다.', error: true });
|
||||
console.error(e.responseText);
|
||||
},
|
||||
complete: function() {
|
||||
$("#btn_query_obp").prop("disabled", false).html('<i class="material-icons">search</i> 파트너코드 조회');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#btn_modify").click(function(){
|
||||
if (!checkRequired("ajaxForm")) return;
|
||||
|
||||
@@ -630,10 +589,7 @@
|
||||
<tr>
|
||||
<th style="width:15%;"><%= localeMessage.getString("portalOrg.orgCode") %></th>
|
||||
<td colspan="3" style="width:35%;">
|
||||
<div style="display: flex; align-items: center;">
|
||||
<input type="text" name="orgCode" id="orgCode" style="width: 200px; margin-right: 10px;"/>
|
||||
<button type="button" class="cssbtn smallBtn" id="btn_query_obp"><i class="material-icons">search</i> 파트너코드 조회</button>
|
||||
</div>
|
||||
<input type="text" name="orgCode" id="orgCode"/>
|
||||
</td>
|
||||
<th><%= localeMessage.getString("portalOrg.orgIndustryType") %></th> <%--업종--%>
|
||||
<td><input type="text" name="orgIndustryType" id="orgIndustryType" maxlength="50" /></td>
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
package com.eactive.eai.rms.onl.apim.portalorg;
|
||||
|
||||
import com.eactive.ext.kjb.common.KjbObpException;
|
||||
import com.eactive.ext.kjb.obp.KjbObpModule;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* OBP 파트너코드 조회 서비스
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class ObpPartnerCodeService {
|
||||
|
||||
private KjbObpModule getObpModule() {
|
||||
return KjbObpModule.getInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
* 사업자등록번호로 OBP 파트너코드 조회
|
||||
* @param compRegNo 사업자등록번호
|
||||
* @return 조회 결과 (success, partnerCode 또는 message)
|
||||
*/
|
||||
public Map<String, Object> queryPartnerCode(String compRegNo) {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
|
||||
try {
|
||||
String partnerCode = getObpModule().queryPartnerCode(compRegNo);
|
||||
|
||||
result.put("success", true);
|
||||
result.put("partnerCode", partnerCode);
|
||||
log.info("[OBP] 파트너코드 조회 성공 - compRegNo: {}, partnerCode: {}", compRegNo, partnerCode);
|
||||
|
||||
} catch (IllegalArgumentException e) {
|
||||
log.warn("[OBP] 파트너코드 조회 실패 - 잘못된 입력: {}", e.getMessage());
|
||||
result.put("success", false);
|
||||
result.put("message", e.getMessage());
|
||||
|
||||
} catch (KjbObpException e) {
|
||||
log.warn("[OBP] 파트너코드 조회 실패 - OBP 오류: {}", e.getMessage());
|
||||
result.put("success", false);
|
||||
result.put("message", "OBP 조회 실패: " + e.getMessage());
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("[OBP] 파트너코드 조회 중 오류 발생", e);
|
||||
result.put("success", false);
|
||||
result.put("message", "시스템 오류가 발생했습니다.");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,6 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
@Slf4j
|
||||
@Controller
|
||||
@@ -36,7 +35,6 @@ public class PortalOrgManController extends BaseAnnotationController {
|
||||
|
||||
private final PortalOrgManService portalOrgManService;
|
||||
private final ComboService comboService;
|
||||
private final ObpPartnerCodeService obpPartnerCodeService;
|
||||
|
||||
@GetMapping(value = "/onl/apim/portalorg/portalOrgMan.view")
|
||||
public void view() {
|
||||
@@ -194,15 +192,4 @@ public class PortalOrgManController extends BaseAnnotationController {
|
||||
return ResponseEntity.ok(new GridResponse<>(page));
|
||||
}
|
||||
|
||||
/**
|
||||
* OBP 파트너코드 조회
|
||||
* @param compRegNo 사업자등록번호
|
||||
* @return partnerCode
|
||||
*/
|
||||
@PostMapping(value = "/onl/apim/portalorg/portalOrgMan.json", params = "cmd=QUERY_OBP_PARTNER_CODE")
|
||||
public ResponseEntity<Map<String, Object>> queryObpPartnerCode(@RequestParam("compRegNo") String compRegNo) {
|
||||
Map<String, Object> result = obpPartnerCodeService.queryPartnerCode(compRegNo);
|
||||
return ResponseEntity.ok(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user