From 1aadfa02ef73a263e26e6f6f14a23956d8d9c46b Mon Sep 17 00:00:00 2001 From: panshuling321 Date: Fri, 20 May 2022 16:25:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AF=B9=E9=87=8D=E5=A4=8D?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E5=B7=B2=E6=8F=90=E7=8E=B0=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=9B=9E=E6=89=A7=E7=9A=84=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/XhpcClearingCheckoutMapper.java | 5 +++++ .../impl/XhpcClearingCheckoutServiceImpl.java | 9 ++++----- .../mapper/XhpcClearingCheckoutMapper.xml | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/mapper/XhpcClearingCheckoutMapper.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/mapper/XhpcClearingCheckoutMapper.java index a354e424..2c7c1718 100644 --- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/mapper/XhpcClearingCheckoutMapper.java +++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/mapper/XhpcClearingCheckoutMapper.java @@ -35,4 +35,9 @@ public interface XhpcClearingCheckoutMapper { List selectOrderMapByCheckoutIds(@Param("checkoutIds")String checkoutIds); int updateStatusByIds(@Param("checkoutIds")String checkoutIds, @Param("status")Integer status); + + + List> selectMapGroupByStatus(@Param("checkoutIds")String checkoutIds); + + String selectIdsByStatusAndIds(@Param("checkoutIds")String checkoutIds, @Param("status") Integer status); } \ No newline at end of file diff --git a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/XhpcClearingCheckoutServiceImpl.java b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/XhpcClearingCheckoutServiceImpl.java index 379a91b5..8e85a512 100644 --- a/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/XhpcClearingCheckoutServiceImpl.java +++ b/xhpc-modules/xhpc-activity/src/main/java/com/xhpc/activity/service/impl/XhpcClearingCheckoutServiceImpl.java @@ -283,17 +283,16 @@ public class XhpcClearingCheckoutServiceImpl extends BaseService implements Xhpc List checkoutList = util.importExcel(new FileInputStream(dataFile)); String checkoutIds = checkoutList.stream().map(CheckoutBankVo::getIndex).collect(Collectors.joining(",")); + String unReceiptIds = checkoutMapper.selectIdsByStatusAndIds(checkoutIds, 1); - if (checkoutIds.length() > 1) { + if (unReceiptIds.length() > 1) { List receiptDomainList = receiptVo.getReceiptList(); for (XhpcClearingReceiptDomain receiptDomain : receiptDomainList) { - receiptDomain.setClearingCheckoutIds(checkoutIds); - receiptDomain.setCreateBy(receiptVo.getCreateBy()); + receiptDomain.setClearingCheckoutIds(unReceiptIds); } receiptMapper.insretBatch(receiptDomainList); + checkoutMapper.updateStatusByIds(unReceiptIds, 6); } - - checkoutMapper.updateStatusByIds(checkoutIds, 6); return true; } diff --git a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcClearingCheckoutMapper.xml b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcClearingCheckoutMapper.xml index f7cbe34e..47c844b0 100644 --- a/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcClearingCheckoutMapper.xml +++ b/xhpc-modules/xhpc-activity/src/main/resources/mapper/XhpcClearingCheckoutMapper.xml @@ -145,7 +145,20 @@ - + + + + + + + update xhpc_clearing_checkout set del_flag=2 where clearing_checkout_id = #{clearingCheckoutId,jdbcType=BIGINT}