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}