Exemplo n.º 1
0
  // payment re-process
  @RequestMapping(value = "/bsar/payment/reprocess", method = RequestMethod.POST)
  public @ResponseBody MessageParam pymReprocess(
      @RequestParam("lnkgPymSeqNo") String lnkgPymSeqNo) {

    int updatedRowCnt = pymProcessService.pymReprocess(lnkgPymSeqNo);

    if (updatedRowCnt == 1) {
      return new MessageParam(ResultCode.SUCCESS, "Successfully request paymemt reprocess");
    } else {
      return new MessageParam(ResultCode.SUCCESS, "Aready,");
    }
  }
Exemplo n.º 2
0
  @Override
  public String autoHotBillPymProcess(String hbSeqNo, double billAcntBalance, OtimeVO otimeVO)
      throws SQLException {

    // make payment structure
    String lnkgPymSclsCd = "206000";
    String zeroAmt = "0.00";
    RecpDataCmd recpDataCmd = new RecpDataCmd();
    recpDataCmd.setHbSeqNo(hbSeqNo);
    recpDataCmd.setEventCode(lnkgPymSclsCd); // payment of hotbill (common-code :: LnkgPymSclsCd)

    ArLnkgPymMgMtVO arLnkgPymMgMtVO = this.pymProcessService.getMgMtData(recpDataCmd);

    otimeVO.setBillAcntCustNm(arLnkgPymMgMtVO.getBillAcntCustNm()); // 청구계정고객명
    otimeVO.setBillAcntPymSsn(arLnkgPymMgMtVO.getBillAcntPymSsn()); // 청구계정납부SSN

    // otimeVO.set
    otimeVO.setPymLvlCd("2");
    otimeVO.setCsEvntCd(lnkgPymSclsCd);
    otimeVO.setRcpmnyDt(CmnDateUtils.addDate(0));
    otimeVO.setHbSeqNo(hbSeqNo); // 핫빌누적번호
    otimeVO.setLnkgPymLclsCd(lnkgPymSclsCd.substring(0, 2));
    otimeVO.setLnkgPymMclsCd(lnkgPymSclsCd.substring(0, 4));
    otimeVO.setLnkgPymSclsCd(lnkgPymSclsCd);

    otimeVO.setGrtmnRfndAmt(zeroAmt);
    otimeVO.setCustRfndAmt(zeroAmt);
    otimeVO.setCustPymAmt(zeroAmt);
    otimeVO.setCashPymAmt(zeroAmt);
    otimeVO.setGrtmnPymAmt(zeroAmt);
    otimeVO.setCashRfndAmt(zeroAmt);
    otimeVO.setInsRflctAmt(zeroAmt);

    List<PaymentsVO> paymentsVOs = pymProcessService.getBillCycleParamCrte(recpDataCmd);

    Map<String, String> sumAmtMap = this.getLnkgPymTrgtSumAmts(paymentsVOs);
    otimeVO.setPymTrgtAmt(sumAmtMap.get("pymTrgtAmtSum"));
    otimeVO.setAddvTxAmt(sumAmtMap.get("addvTxAmtSum"));
    otimeVO.setSplyAmt(sumAmtMap.get("splyAmtSum"));

    //	    try{
    //	    ObjectMapper om1 = new ObjectMapper();
    //		String temp1 = om1.defaultPrettyPrintingWriter().writeValueAsString(paymentsVOs);
    //		System.out.println("old paymentsVOsstructure::"+temp1);
    //		} catch (Exception e) {
    //			System.err.println(e.toString());
    //		}

    for (PaymentsVO eachPayment : paymentsVOs) {

      List<ArLnkgPymTrgtVO> newTrgtList =
          setImdtPymYnAndRshtItemCd(eachPayment.getArLnkgPymEntr().getArLnkgPymTrgt());
      eachPayment.getArLnkgPymEntr().setArLnkgPymTrgt(newTrgtList);
    }

    /*	    List<PaymentsVO> new_payment_list = new ArrayList<PaymentsVO>();

      for (PaymentsVO each_payment : paymentsVOs) {

      	PaymentsVO newPaymentsVO = new PaymentsVO();

      	ArLnkgPymEntrVO arLnkgPymEntrVO = each_payment.getArLnkgPymEntr();


      	List<ArLnkgPymTrgtVO> newArLnkgPymTrgtVOs = new ArrayList<ArLnkgPymTrgtVO>();
      	List<ArLnkgPymTrgtVO> arLnkgPymTrgtVOs = each_payment.getArLnkgPymEntr().getArLnkgPymTrgt();

      	for(ArLnkgPymTrgtVO arLnkgPymTrgtVO : arLnkgPymTrgtVOs) {
    	arLnkgPymTrgtVO.setImdtPymYn("0");										// 익월청구로 세팅
    	arLnkgPymTrgtVO.setRshtItemCd("2" + arLnkgPymTrgtVO.getBlItemMclsCd());	// 영수증항목 하드코딩(청구중분류만 있으므로)

    	newArLnkgPymTrgtVOs.add(arLnkgPymTrgtVO);
    }

      	arLnkgPymEntrVO.getArLnkgPymTrgt().clear();
      	arLnkgPymEntrVO.setArLnkgPymTrgt(newArLnkgPymTrgtVOs);


      	newPaymentsVO.setArLnkgPymEntr(arLnkgPymEntrVO);

      	new_payment_list.add(newPaymentsVO);
      }*/

    otimeVO.setPayments(paymentsVOs);

    //	    try{
    //	    ObjectMapper om2 = new ObjectMapper();
    //		String temp2 = om2.defaultPrettyPrintingWriter().writeValueAsString(paymentsVOs);
    //		System.out.println("new paymentsVOsstructure::"+temp2);
    //		} catch (Exception e) {
    //			System.err.println(e.toString());
    //		}

    ArLnkgPymMgmtMemoVO arLnkgPymMgmtMemoVO = new ArLnkgPymMgmtMemoVO();
    arLnkgPymMgmtMemoVO.setUserMemoCntnt(
        "Auto HotBill using bill account balance("
            + billAcntBalance
            + ") for threshold revocation.");

    otimeVO.setArLnkgPymMgmtMemo(arLnkgPymMgmtMemoVO);

    // 익월청구이므로 납부방법별 수납금액은 없으므로 []로 넘김. null로 넘기면 null pointer exception 발생 주의
    otimeVO.setArLnkgPymDetl(new ArrayList<ArLnkgPymDetlVO>());

    Map<String, Object> pymResMap = pymProcessService.insertGeneralPymData(otimeVO);

    pymProcessService.updateArLnkgPymMgmt((String) pymResMap.get("recpNo"));

    return (String) pymResMap.get("recpNo");
  }