Beispiel #1
0
  /** 가입자별 수납 파라미터 생성 * */
  @RequestMapping(value = "/bsar/ar/pymItemCrte", method = RequestMethod.POST)
  @ResponseBody
  public List<SubsPymItem> pymItemCrte(@RequestBody RecpDataCmd recpDataCmd) {

    String recpNo = recpDataCmd.getRecpNo();
    String hbSeqNo = recpDataCmd.getHbSeqNo();
    String eventCode = recpDataCmd.getEventCode();

    logger.debug("recpDataCrte" + recpNo);
    logger.debug("recpDataCrte" + hbSeqNo);
    logger.debug("recpDataCrte" + eventCode);

    List<SubsPymItem> payments = new ArrayList<SubsPymItem>();

    if (recpNo != "") {

      payments = this.pymProcessService.getSubsPymParamCrte(recpDataCmd);
    } else {

      try {

        throw new Exception();
      } catch (Exception e) {

        e.printStackTrace();
      }
    }

    return payments;
  }
Beispiel #2
0
  /** 일반수납 파라미터 생성 * */
  @RequestMapping(value = "/bsar/ar/recpDataCrte", method = RequestMethod.POST)
  @ResponseBody
  // public List<PaymentsVO> recpDataCrte(@RequestBody RecpDataCmd
  // recpDataCmd){
  public Map<String, Object> recpDataCrte(@RequestBody RecpDataCmd recpDataCmd) {

    String recpNo = recpDataCmd.getRecpNo();
    String hbSeqNo = recpDataCmd.getHbSeqNo();
    String eventCode = recpDataCmd.getEventCode();
    Map<String, Object> resMap = new HashMap<String, Object>();

    if (logger.isDebugEnabled()) {

      logger.debug("recpDataCrte" + recpNo);
      logger.debug("recpDataCrte" + hbSeqNo);
      logger.debug("recpDataCrte" + eventCode);
    }

    List<PaymentsVO> payments = new ArrayList<PaymentsVO>();

    try {
      // 청구, 선불충전
      // TODO 청구 이벤트랑 선불충전의 차이가 있을지 없을지 확인
      if (StringUtils.isNotEmpty(recpNo) && StringUtils.isEmpty(hbSeqNo)) {

        if (logger.isDebugEnabled()) {
          logger.debug("recpDataCrte 청구" + recpNo);
          logger.debug("recpDataCrte 청구" + hbSeqNo);
          logger.debug("recpDataCrte 청구" + eventCode);
        }

        payments = this.pymProcessService.getBillParamCrte(recpDataCmd);
      } else if (StringUtils.isNotEmpty(hbSeqNo) && StringUtils.isEmpty(recpNo)) {

        if (logger.isDebugEnabled()) {
          logger.debug("recpDataCrte 핫빌" + hbSeqNo);
          logger.debug("recpDataCrte 핫빌" + recpNo);
          logger.debug("recpDataCrte 핫빌" + eventCode);
        }

        // Arrays.asList("201001", "201002","205000","206000").contains(eventCode)
        if ("201001".equals(eventCode) // none number saving(일시정지)
            || "201002".equals(eventCode) // number saving(일시정지)
            || "205000".equals(eventCode) // 청구주기 변경
            || "206000".equals(eventCode) // 실시간 수납
        ) { // 주기변경,
          // 2013-05-06 추가 일시정지,실시간수납 ==> 이전보증금 미편성
          payments = this.pymProcessService.getBillCycleParamCrte(recpDataCmd);
        } else { // 이전보증금 포함(자동수납항목)
          payments = this.pymProcessService.getHotBillParamCrte(recpDataCmd);
        }
      }

      resMap.put("payments", payments);
      resMap.put("result", "SUCCESS");

    } catch (AcubeCommonException e) {
      resMap.put("result", "FAIL: " + e.toString());
    } catch (Exception e) {
      resMap.put("result", "FAIL: " + e.toString());
    }

    return resMap;
    // return payments;
  }