From 601f0c554621bb1e20bbeffcbbd42abfdd41f45a Mon Sep 17 00:00:00 2001 From: yjf <2211675158@qq.com> Date: Wed, 16 Feb 2022 08:59:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=BF=E5=8F=91=E6=94=AF=E4=BB=98=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E6=9B=B4=E6=96=B0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cgb/controller/OperateOfCGBController.java | 2 +- src_cmb/com/tenwa/cgb/util/CGBLogAssistant.java | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src_cmb/com/tenwa/cgb/controller/OperateOfCGBController.java b/src_cmb/com/tenwa/cgb/controller/OperateOfCGBController.java index 32b86ad25..150800ef3 100644 --- a/src_cmb/com/tenwa/cgb/controller/OperateOfCGBController.java +++ b/src_cmb/com/tenwa/cgb/controller/OperateOfCGBController.java @@ -123,7 +123,7 @@ public class OperateOfCGBController { */ public String batchQueryOfCGB(JBOTransaction tx) throws Exception { BizObjectManager bm = JBOFactory.getBizObjectManager(LC_FUND_INCOME_CALLBACK_DETAIL_TEMP.CLASS_NAME); - List bizObjects = bm.createQuery(" flowunid = :flowunid and cmb_pay_log is not null and ERRTXT='付款中' ") + List bizObjects = bm.createQuery(" flowunid = :flowunid and cmb_pay_log is not null and ERRTXT not in ('付款成功') ") .setParameter("flowunid", flowUnid).getResultList(false); if (bizObjects.isEmpty()) return "待回盘数据为空,请检查"; String customerBatchNo = null, customerSalarySeq = null; diff --git a/src_cmb/com/tenwa/cgb/util/CGBLogAssistant.java b/src_cmb/com/tenwa/cgb/util/CGBLogAssistant.java index 4e3782dbe..3e0328eac 100644 --- a/src_cmb/com/tenwa/cgb/util/CGBLogAssistant.java +++ b/src_cmb/com/tenwa/cgb/util/CGBLogAssistant.java @@ -7,6 +7,9 @@ import com.amarsoft.awe.util.SqlObject; import com.amarsoft.awe.util.Transaction; import com.tenwa.comm.util.date.DateAssistant; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + /** * @program: apzl_leasing * @author: yjf @@ -29,6 +32,7 @@ public class CGBLogAssistant { sqlca.executeSQL(sqlObject); tx.commit(); } catch (Exception e) { + e.printStackTrace(); if (tx != null) try { tx.rollback(); } catch (JBOException e1) { @@ -52,16 +56,24 @@ public class CGBLogAssistant { .setParameter("retTime", DateAssistant.getTodayNow()) .setParameter("batchNo", batchNo); } else { - sb.append(" serial_num =:serialNum"); + Pattern pm = Pattern.compile("(?<=)([\\S\\s]+)(?=)"); + Matcher mm = pm.matcher(retMsg); + String entSeqNo = null; + if(mm.find()){ + entSeqNo = mm.group(); + } + sb.append(" serial_num =:serialNum and req_msg regexp :entSeqNo "); sqlObject = new SqlObject(sb.toString()) .setParameter("retMsg", retMsg) .setParameter("retTime", DateAssistant.getTodayNow()) .setParameter("batchNo", batchNo) - .setParameter("serialNum", serialNum); + .setParameter("serialNum", serialNum) + .setParameter("entSeqNo", entSeqNo); } sqlca.executeSQL(sqlObject); tx.commit(); } catch (Exception e) { + e.printStackTrace(); if (tx != null) try { tx.rollback(); } catch (JBOException e1) {