Merge branch 'main-design-layout' of https://git.eactive.synology.me:8090/kjb-eapim/eapim-portal into main-design-layout

This commit is contained in:
Rinjae
2025-11-18 10:03:53 +09:00
49 changed files with 1911 additions and 1284 deletions
@@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RequestParam;
@Controller
@RequestMapping("/agreements")
public class AgreementsController {
public static final String TERMS_AGREEMENTS = "fragment/kbank/terms_agreements";
public static final String TERMS_AGREEMENTS = "fragment/kjbank/terms_agreements";
private final AgreementsFacade agreementsFacade;
@@ -119,7 +119,7 @@ public class CommissionController {
@PostMapping()
public ResponseEntity<?> list(@RequestBody CommissionSearch search) {
CommissionDTO commissionDTO = null;
search.setProvider(providerCode);
search.setPartnerCode(SecurityUtil.getUserOrg().getOrgCode());
if (!StringUtils.isEmpty(search.getPartnerCode())) {
@@ -157,50 +157,6 @@ public class CommissionController {
return ErrorUtil.create("fail.commission.needPartnerCode");
}
@GetMapping("/print1/{year}/{month}")
public ResponseEntity<?> print(
@PathVariable("year") String year,
@PathVariable("month") String month) {
CommissionDTO commissionDTO = null;
CommissionSearch search = new CommissionSearch();
search.setOrganization(SecurityUtil.getPortalAuthenticatedUser().getPortalOrg());
search.setProvider(providerCode);
search.setYear(year);
search.setMonth(month);
search.setPartnerCode(SecurityUtil.getUserOrg().getOrgCode());
if (!StringUtils.isEmpty(search.getPartnerCode())) {
try {
String url = obmUrl + Constants.COMMISSION_PRINT_URL;
String result = externalService.getResponseHttpPost(url, toJson(search));
HashMap<String, Object> returnObj = new ObjectMapper().readValue(result, HashMap.class);
if (StringUtils.pathEquals(search.getPartnerCode(), "000002-01")) {
log.debug("Found Together : " + search.getPartnerCode());
search.setPartnerCode("000002-02");
String togetherResult = externalService.getResponseHttpPost(url, toJson(search));
HashMap<String, Object> togetherLendingReturnObj = new ObjectMapper().readValue(togetherResult, HashMap.class);
log.debug("togetherLendingReturnObj : " + togetherLendingReturnObj.toString());
if (!StringUtils.isEmpty(togetherLendingReturnObj.get("error"))) {
HashMap<String, Object> error = (HashMap) togetherLendingReturnObj.get("error");
return ErrorUtil.create("fail.commission.serverError", error.get("message").toString());
}
HashMap<String, Object> mergeMap = mergeCommissionData(returnObj, togetherLendingReturnObj);
result = new ObjectMapper().writeValueAsString(mergeMap);
}
commissionDTO = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false).readValue(result, CommissionDTO.class);
} catch (Exception e) {
log.warn(e.getMessage(), e);
return ErrorUtil.create("fail.commission.list", "수수료 조회에 실패하였습니다.");
}
return ResponseEntity.ok().body(commissionDTO);
}
return ErrorUtil.create("fail.commission.needPartnerCode");
}
private String toJson(CommissionSearch search) {
try {
Map<String, String> jsonMap = new HashMap<>();