示例#1
0
 private void countAmt(Xfactcutpaydetl[] records) {
   initAmt();
   for (Xfactcutpaydetl record : records) {
     totalamt = totalamt.add(record.getPaybackamt());
     totalPrincipalAmt = totalPrincipalAmt.add(record.getPrincipalamt());
     totalInterestAmt = totalInterestAmt.add(record.getServicechargefee());
     totalFxjeAmt = totalFxjeAmt.add(record.getBreachfee()); // 滞纳金 罚息?
   }
 }
示例#2
0
 private Xfactcutpaydetl[] getRecordsByWhere() throws XfactcutpaydetlDaoException {
   XfactcutpaydetlDao detlDao = XfactcutpaydetlDaoFactory.create();
   String sql =
       "billstatus = "
           + XFBillStatus.BILLSTATUS_CORE_SUCCESS
           + " and clientname like '%"
           + detlRecord.getClientname()
           + "%' "
           + " and contractno like '%"
           + detlRecord.getContractno()
           + "%' "
           + " order by journalno";
   return detlDao.findByDynamicWhere(sql, null);
 }
示例#3
0
  public String deleteRecord() {
    String contractno = selectedRecord.getContractno();

    init();
    return null;
  }
示例#4
0
  public int processWriteBack(Xfactcutpaydetl[] detls) throws Exception {

    int count = 0;

    T100102CTL t100102ctl = new T100102CTL();
    T100104CTL t100104ctl = new T100104CTL();
    XfactcutpaydetlDao detlDao = XfactcutpaydetlDaoFactory.create();
    XfactcutpaydetlPk cutpaydetlPk = new XfactcutpaydetlPk();

    for (Xfactcutpaydetl detl : detls) {
      if (!detl.getBillstatus().equals(XFBillStatus.BILLSTATUS_CORE_SUCCESS)) {
        logger.error("状态检查失败" + detl.getJournalno());
        continue;
      }
      boolean txResult = false;
      if (detl.getBilltype().equals("0")) { // 正常还款
        T100102RequestRecord recordT102 = new T100102RequestRecord();
        recordT102.setStdjjh(detl.getRecvact());
        recordT102.setStdqch(detl.getPoano().toString());
        recordT102.setStdjhkkr(new SimpleDateFormat("yyyyMMdd").format(detl.getPaybackdate()));
        // 1-成功 2-失败
        recordT102.setStdkkjg("1");
        T100102RequestList t100102list = new T100102RequestList();
        t100102list.add(recordT102);
        // 单笔发送处理
        txResult = t100102ctl.start(t100102list);
      } else if (detl.getBilltype().equals("2")) { // 提前还款
        T100104RequestRecord recordT104 = new T100104RequestRecord();
        recordT104.setStdjjh(detl.getRecvact());
        recordT104.setStdqch(detl.getPoano().toString());
        recordT104.setStdjhkkr(new SimpleDateFormat("yyyyMMdd").format(detl.getPaybackdate()));
        // 1-成功 2-失败
        recordT104.setStdkkjg("1");
        T100104RequestList t100104list = new T100104RequestList();
        t100104list.add(recordT104);
        // 单笔发送处理
        txResult = t100104ctl.start(t100104list);
      }

      if (txResult) {
        cutpaydetlPk.setJournalno(detl.getJournalno());
        detl.setBillstatus(XFBillStatus.FD_WRITEBACK_SUCCESS);
        detlDao.update(cutpaydetlPk, detl);
        count++;
      }
    }

    return count;
  }