From 007ae38b38e42cc06746363929727786e1daae21 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Thu, 1 Jun 2023 19:29:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cweb/notify/LaKaLaController.java | 4 --- .../main/java/com/hfkj/schedule/Merchant.java | 26 ++++++++++--------- .../impl/BsMerSettleAcctApplyServiceImpl.java | 2 +- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/cweb/src/main/java/com/cweb/notify/LaKaLaController.java b/cweb/src/main/java/com/cweb/notify/LaKaLaController.java index 0cecce6..4e07665 100644 --- a/cweb/src/main/java/com/cweb/notify/LaKaLaController.java +++ b/cweb/src/main/java/com/cweb/notify/LaKaLaController.java @@ -146,10 +146,6 @@ public class LaKaLaController { merLedger.setRejectReason(respData.getString("remark")); } merLedgerService.editMerLedger(merLedger); - - if (merLedger.getStatus().equals(MerLedgerStatusEnum.status1.getNumber())) { - laKaLaLedgerService.applyLedgerReceiver(merLedger.getMerId()); - } } } diff --git a/schedule/src/main/java/com/hfkj/schedule/Merchant.java b/schedule/src/main/java/com/hfkj/schedule/Merchant.java index e545993..cfb2e2b 100644 --- a/schedule/src/main/java/com/hfkj/schedule/Merchant.java +++ b/schedule/src/main/java/com/hfkj/schedule/Merchant.java @@ -256,18 +256,21 @@ public class Merchant { } BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNo(mer.getId(), PlatformTypeEnum.type1); - BsMerLedger merLedger = new BsMerLedger(); - merLedger.setMerId(mer.getId()); - merLedger.setMerName(mer.getMerName()); - merLedger.setPlatformType(merPlatform.getPlatformType()); - merLedger.setPlatformNo(merPlatform.getPlatformNo()); - merLedger.setCupNo(merPlatform.getCupNo()); - merLedger.setStatus(MerLedgerStatusEnum.status2.getNumber()); - merLedger.setReceiverStatus(false); - merLedgerService.editMerLedger(merLedger); - - laKaLaLedgerService.applyLedgerReceiver(merLedger.getMerId()); + BsMerLedger merLedger = merLedgerService.getMerLedger(mer.getId(), PlatformTypeEnum.type1); + if (merLedger == null) { + merLedger = new BsMerLedger(); + merLedger.setMerId(mer.getId()); + merLedger.setMerName(mer.getMerName()); + merLedger.setPlatformType(merPlatform.getPlatformType()); + merLedger.setPlatformNo(merPlatform.getPlatformNo()); + merLedger.setCupNo(merPlatform.getCupNo()); + merLedger.setStatus(MerLedgerStatusEnum.status2.getNumber()); + merLedger.setReceiverStatus(false); + merLedgerService.editMerLedger(merLedger); + + laKaLaLedgerService.applyLedgerReceiver(merLedger.getMerId()); + } } else if (customer.getString("customerStatus").equals("REJECT")) { contractRecord.setStatus(3); merContractRecordService.updateRecord(contractRecord); @@ -312,7 +315,6 @@ public class Merchant { if (settle != null) { settle.setStatus(0); merSettleAcctService.editMerSettleAcct(settle); - } BsMerSettleAcct newSettle = new BsMerSettleAcct(); diff --git a/service/src/main/java/com/hfkj/service/impl/BsMerSettleAcctApplyServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsMerSettleAcctApplyServiceImpl.java index 4d3c52f..50ac5c3 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsMerSettleAcctApplyServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsMerSettleAcctApplyServiceImpl.java @@ -130,7 +130,7 @@ public class BsMerSettleAcctApplyServiceImpl implements BsMerSettleAcctApplyServ } if (MapUtils.getInteger(param, "status") != null) { - criteria.andApplyNoIsNotNull(); + criteria.andStatusEqualTo(MapUtils.getInteger(param, "status")); } example.setOrderByClause("create_time desc");