コード例 #1
0
ファイル: ArController.java プロジェクト: kangyou7/csbs
  @RequestMapping(
      value = "/bsar/ar/arPayment",
      method = RequestMethod.POST,
      consumes = {"application/json"})
  public String arPaymentOpen(
      Model model,
      @RequestBody OtimeVO otimeVO,
      @RequestParam(required = false) String callBackFunc) {

    logger.debug("pymDiv:::::::::::" + otimeVO.toString());
    logger.debug("pymDiv:::::::::::" + callBackFunc);

    ObjectMapper om = new ObjectMapper();
    String temp = null;
    try {
      temp = om.defaultPrettyPrintingWriter().writeValueAsString(otimeVO);
    } catch (Exception e) {
      // e.printStackTrace();
    }

    model.addAttribute("recpData", temp);
    model.addAttribute("callBackFunc", callBackFunc);
    model.addAttribute("rcpmnyDt", CmnDateUtils.addDate(0));

    // cycle bill and hotbill(payment for real time) and ownership-change hotbill(before) and
    // terminate(hotbill)
    if (otimeVO.getCsEvntCd().substring(0, 2).equals("30")
        || otimeVO.getCsEvntCd().equals("206000")
        || otimeVO.getCsEvntCd().equals("203010")
        || otimeVO.getCsEvntCd().equals("207000")) {

      List<CoAuthCodeInfo> authList =
          securityService.getCurrentMember().getSpCoAuthCodeInfoAuthList();

      for (CoAuthCodeInfo coAuthCodeInfo : authList) {
        if (coAuthCodeInfo
            .getAuthName()
            .equals("PaymentBankTransfer")) { // auth_name :: 'PaymentBankTransfer'
          model.addAttribute("bnkTransferViewalbe", true); // lnkgPymLclsCd == 30 and 권한 유저
          return "dialog.bsar.ar.arPayment";
        }
      }

      model.addAttribute("bnkTransferViewalbe", false); // lnkgPymLclsCd == 30 and 비권한 유저
      return "dialog.bsar.ar.arPayment";

    } else {
      model.addAttribute("bnkTransferViewalbe", false); // lnkgPymLclsCd != 30 and 비권한 유저
      return "dialog.bsar.ar.arPayment";
    }
  }
コード例 #2
0
ファイル: ArController.java プロジェクト: kangyou7/csbs
  /**
   * 수납처리
   *
   * <p>*
   */
  @SuppressWarnings("unchecked")
  @RequestMapping(value = "/bsar/ar/paymentProcess", method = RequestMethod.POST)
  @ResponseBody
  public Map<String, Object> paymentProcess(@RequestBody OtimeVO otimeVO) {

    Map<String, Object> resMap = new HashMap<String, Object>();
    // TODO 1. otimeVO 멤버 주입
    otimeVO.setOperator(this.securityService.getCurrentMember());

    logger.debug("paymentProcess" + otimeVO.getCustRfndAmt());
    logger.debug("paymentProcess" + otimeVO.getCustPymAmt());

    // Map resMap = new HashMap<String, Object>();

    // System.out.println("확인용:::::::::::::::::" + otimeVO.getCsEvntCd());
    String eventCode = otimeVO.getCsEvntCd();

    int evtCodeFirtTwo = Integer.valueOf(eventCode.substring(0, 2));

    try {

      if (evtCodeFirtTwo < 30) { // LnkgPymLclsCd 3O 미만 (CS 발생 수납 이벤트 및 핫빌관련 수납)
        resMap = this.pymProcessService.insertGeneralPymData(otimeVO);
      } else { // LnkgPymLclsCd 3O 이상 (청구서 수납 및 선불 충전)  --> 수납화면 오픈 전 Merge로 MGMT, ENTR, TRGT 테이블 선
        // 저장됨.
        resMap = this.pymProcessService.insertBillPymData(otimeVO);
      }

      String lnkgPymSeqNo = (String) resMap.get("recpNo");

      if (!otimeVO.getCsEvntCd().equals("129100")) {

        this.pymProcessService.reserveOpenApiPymMthd(lnkgPymSeqNo);
      }

    } catch (AcubeCommonException e2) {
      resMap.put("status", "FAIL :" + e2.toString());
      logger.error("paymentProcess error occured :" + e2.toString());
    } catch (SQLException e1) {
      resMap.put("status", "FAIL :" + e1.toString());
      logger.error("paymentProcess error occured :" + e1.toString());
    } catch (Exception e) {
      resMap.put("status", "FAIL :" + e.toString());
      logger.error("paymentProcess error occured :" + e.toString());
    }
    return resMap;
  }