Exemplo n.º 1
0
  private boolean doReq(List<TlogBean> normalDfs) {
    StringBuffer normalMsg = new StringBuffer();
    StringBuffer exceptionMsg = new StringBuffer();
    String resp = "手工审核成功\n";
    try {
      // MMs重发代付、 因订单重新生产
      if (normalDfs.size() != 0) {
        for (TlogBean tlog : normalDfs) {
          String respFlag = "suc";
          if (!"suc".equals(respFlag)) {
            tlog.setTstat(PayState.FAILURE);
            tlog.setError_msg("请求银行失败");
            tlog.setAgainPay_status(Constant.SgDfTstat.TSTAT_SHFAIL);
            new SgDfShDao().updateTstat(tlog);
            exceptionMsg.append(tlog.getOid()).append(",");
          } else {
            normalMsg.append(tlog.getOid()).append(",");
          }
        }
      }
    } catch (Exception e) {
      LogUtil.printErrorLog("SgDfShService", "reqPayDf", "reqPayDf_exception", e);
    }

    if (!Ryt.empty(normalMsg.toString())) {
      resp += "提交成功:" + normalMsg.substring(0, normalMsg.length() - 1) + "\n";
    }
    if (!Ryt.empty(exceptionMsg.toString())) {
      resp += "请求银行失败:" + exceptionMsg.substring(0, exceptionMsg.length() - 1) + "\n";
    }
    LogUtil.printInfoLog("SgDfShServiceTest", "doReq", "resp:" + resp);

    return true;
  }
Exemplo n.º 2
0
  private Map<String, String> parseSubjectDN(String subjectDN) {
    Map<String, String> map = new HashMap<String, String>();
    String fields[] = subjectDN.split(",");
    for (String item : fields) {
      String kv[] = item.split("=");
      if (Ryt.empty(kv[0])) continue;

      map.put(kv[0].trim(), Ryt.empty(kv[1]) ? "" : kv[1].trim());
    }

    return map;
  }
Exemplo n.º 3
0
 // 当天交易查询的sql条件
 private StringBuffer getConditionSql(
     String queryTable,
     String mid,
     Integer gate,
     Integer tstat,
     Integer type,
     String oid,
     Integer gid,
     String date,
     Integer bdate,
     Integer edate,
     String tseq,
     String bkseq,
     Integer bkCheck,
     Integer mstate,
     String begintrantAmt,
     String endtrantAmt) {
   StringBuffer condition = new StringBuffer();
   // String a="(select * from "+queryTable+" where type!=11) as a ";
   condition.append(" FROM ").append(queryTable + " as a, minfo m ").append(" WHERE  a.mid=m.id ");
   if (!Ryt.empty(mid)) condition.append(" AND a.mid = " + Ryt.addQuotes(mid));
   if (gate != null) condition.append(" AND a.gate = " + gate);
   if (tstat != null) condition.append(" AND a.tstat = " + tstat);
   if (type != null) {
     condition.append(" AND a.type = " + type);
   } else {
     condition.append(" AND a.type not in (11,12,16,17,14) ");
   }
   if (!Ryt.empty(tseq)) condition.append(" AND a.tseq = " + Ryt.addQuotes(tseq));
   if (gid != null) condition.append(" AND a.gid = " + gid);
   if (!Ryt.empty(oid)) condition.append(" AND a.oid like " + Ryt.addQuotes("%" + oid + "%"));
   if (date != null) {
     if (bdate != null) condition.append(" AND " + date + " >= " + bdate);
     if (edate != null) condition.append(" AND " + date + " <= " + edate);
   }
   if (!Ryt.empty(bkseq)) {
     condition.append(" AND (a.bk_seq1 = " + Ryt.addQuotes(bkseq));
     condition.append(" OR a.bk_seq2 = " + Ryt.addQuotes(bkseq));
     condition.append(" ) ");
   }
   if (bkCheck != null) {
     condition.append(" AND a.bk_chk= " + bkCheck);
   }
   if (mstate != null) {
     condition.append(" AND m.mstate= " + mstate);
   }
   if (!Ryt.empty(begintrantAmt)) {
     condition.append(" AND a.amount>= " + Ryt.mul100toInt(begintrantAmt));
   }
   if (!Ryt.empty(endtrantAmt)) {
     condition.append(" AND a.amount<=" + Ryt.mul100toInt(endtrantAmt));
   }
   return condition;
 }