diff --git "a/sql/v2.2\350\264\242\345\212\241/20250106.sql" "b/sql/v2.2\350\264\242\345\212\241/20250106.sql"
index e9553854e76646301003866a2016c3adb1a52b88..81cd0273727bde51f557f693fd105f0123cce05f 100644
--- "a/sql/v2.2\350\264\242\345\212\241/20250106.sql"
+++ "b/sql/v2.2\350\264\242\345\212\241/20250106.sql"
@@ -48,6 +48,9 @@ CREATE TABLE `ecw_receipt_bank_writeoff_range`  (
                                                              PRIMARY KEY (`id`) USING BTREE
 ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '银行收款明细自动核销比例设置表' ROW_FORMAT = DYNAMIC;
 
+
+INSERT INTO `ecw_receipt_bank_writeoff_range` (`id`, `write_off_down`, `write_off_up`, `create_time`, `update_time`, `creator`, `updater`, `deleted`) VALUES (1, 9999, 10000, '2025-01-20 13:39:44', '2025-01-20 13:39:44', '1', '1', 0);
+
 CREATE TABLE `ecw_receipt_invoice`  (
                                                  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
                                                  `invoice_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '开票编号',
diff --git a/yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/api/BankApiImpl.java b/yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/api/BankApiImpl.java
index 7e04733136d2db7bc42095ea99df2caa3d33527f..e3df9a8a89ca69dcca7c15e2cf23bd49ec552cba 100644
--- a/yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/api/BankApiImpl.java
+++ b/yudao-module-ecw/yudao-module-ecw-impl/src/main/java/cn/iocoder/yudao/module/ecw/service/api/BankApiImpl.java
@@ -1,5 +1,6 @@
 package cn.iocoder.yudao.module.ecw.service.api;
 
+import cn.hutool.core.collection.CollectionUtil;
 import cn.iocoder.yudao.module.ecw.api.bank.BankApi;
 import cn.iocoder.yudao.module.ecw.api.bank.dto.BankAccountDTO;
 import cn.iocoder.yudao.module.ecw.convert.bankAccount.BankAccountConvert;
@@ -9,6 +10,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
 import java.util.List;
 
 @Service
@@ -33,16 +35,24 @@ public class BankApiImpl implements BankApi {
 
     @Override
     public void updateBankAccountBalance(BankAccountDTO bankAccountDTO, boolean isAdd) {
-        List<BankAccountDO> bankAccountDOS = bankAccountMapper.selectList(Wrappers.lambdaQuery(BankAccountDO.class)
-                .eq(BankAccountDO::getBaAccountName, bankAccountDTO.getBaAccountName())
-                .eq(BankAccountDO::getBaAccountNum, bankAccountDTO.getBaAccountNum())
-                .eq(BankAccountDO::getBaBankName, bankAccountDTO.getBaBankName()));
-        if (bankAccountDOS != null && !bankAccountDOS.isEmpty()) {
-            BankAccountDO bankAccountDO = bankAccountDOS.get(0);
+        BankAccountDO bankAccountDO = null;
+        if (bankAccountDTO.getId() != null) {
+            bankAccountDO = bankAccountMapper.selectById(bankAccountDTO.getId());
+        } else {
+            List<BankAccountDO> bankAccountDOS = bankAccountMapper.selectList(Wrappers.lambdaQuery(BankAccountDO.class)
+                    .eq(BankAccountDO::getBaAccountName, bankAccountDTO.getBaAccountName())
+                    .eq(BankAccountDO::getBaAccountNum, bankAccountDTO.getBaAccountNum())
+                    .eq(BankAccountDO::getBaBankName, bankAccountDTO.getBaBankName()));
+            if (CollectionUtil.isNotEmpty(bankAccountDOS)) {
+                bankAccountDO = bankAccountDOS.get(0);
+            }
+        }
+        if (bankAccountDO != null) {
+            BigDecimal baBalance = bankAccountDO.getBaBalance() == null ? BigDecimal.ZERO : bankAccountDO.getBaBalance();
             if (isAdd) {
-                bankAccountDO.setBaBalance(bankAccountDO.getBaBalance().add(bankAccountDTO.getBaBalance()));
+                bankAccountDO.setBaBalance(baBalance.add(bankAccountDTO.getBaBalance()));
             } else {
-                bankAccountDO.setBaBalance(bankAccountDO.getBaBalance().subtract(bankAccountDTO.getBaBalance()));
+                bankAccountDO.setBaBalance(baBalance.subtract(bankAccountDTO.getBaBalance()));
             }
             bankAccountMapper.updateById(bankAccountDO);
         }
diff --git a/yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderQueryServiceImpl.java b/yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderQueryServiceImpl.java
index db85e6a77b40e9cc92e751a5423ec19dab71ac3d..a4ddeb0d59b862531845476ebd48f95a5eba110c 100644
--- a/yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderQueryServiceImpl.java
+++ b/yudao-module-order/yudao-module-order-core/src/main/java/cn/iocoder/yudao/module/order/service/order/impl/OrderQueryServiceImpl.java
@@ -3849,7 +3849,9 @@ public class OrderQueryServiceImpl implements OrderQueryService {
             orderCostSummaryDto.setIsCargoControl(back.getIsCargoControl() ? 1 : 0);
             return orderCostSummaryDto;
         }).collect(Collectors.toList());
-        List<OrderCostSummaryDto> resultList = totalList.subList(page.getPage() - 1, Math.min(page.getPage() * page.getRows(), records.size()));
+        int startIndex = Math.max(0, (page.getPage() - 1) * page.getRows());
+        int endIndex = Math.min(startIndex + page.getRows(), records.size());
+        List<OrderCostSummaryDto> resultList = totalList.subList(startIndex, endIndex);
         ContainerReportOrderPageResult<OrderCostSummaryDto> pageResult = new ContainerReportOrderPageResult(resultList, records.size(), page.getRows(), (long) page.getPage(), records.size() / page.getRows() + 1);
         // 汇总全部
         totalList.stream().forEach(orderCostSummaryDto -> {
diff --git a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/mysql/receiptItem/BankReceiptDetailsMapper.java b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/mysql/receiptItem/BankReceiptDetailsMapper.java
index 2f61a5ef7f97e9be5020eaade354d86b52c27a50..915dcd0987650b1337ae1ea62370c6f2843f952f 100644
--- a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/mysql/receiptItem/BankReceiptDetailsMapper.java
+++ b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/mysql/receiptItem/BankReceiptDetailsMapper.java
@@ -15,7 +15,7 @@ public interface BankReceiptDetailsMapper {
 
     IPage<BankIncomeItemResp> getBankIncomeItemPage(IPage<BankIncomeItemResp> page, @Param("req") BankIncomeItemReq req);
 
-    List<CurrencyAmount> calculateAccountBalance(String accountNo);
+    List<CurrencyAmount> calculateAccountBalance(Long accountId);
 
     List<CurrencyAmount> calculateCurrentAmount(@Param("req") BankIncomeItemReq req);
 
diff --git a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/mysql/receivable/ReceivableMapper.java b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/mysql/receivable/ReceivableMapper.java
index 5923cc2d9552f79c9eb8b41fc8987db2d54db96f..a9f7b2896d8878e32108057d729a14091644e245 100644
--- a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/mysql/receivable/ReceivableMapper.java
+++ b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/dal/mysql/receivable/ReceivableMapper.java
@@ -437,4 +437,6 @@ public interface ReceivableMapper extends AbstractMapper<ReceivableDO> {
     List<ReceivableDO> selectBoxReceivablesByOrderIds(@Param("orderIds") Set<Long> orderIds);
 
     List<Long> getAllBoxId();
+
+    List<Long> getDestWarehouseIdListByDestCity(@Param("destCity") List<Long> destCity);
 }
diff --git a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/enums/BoxReportConstant.java b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/enums/BoxReportConstant.java
index 8bc7083228feb50af8899305baa3238c95689d47..61946707db2c32e8de7f5c52b9e27103325cc53f 100644
--- a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/enums/BoxReportConstant.java
+++ b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/enums/BoxReportConstant.java
@@ -13,8 +13,4 @@ public interface BoxReportConstant {
      * 报表查询条件缓存key
      */
     String BOX_REPORT_QUERY_CONDITION_CACHE = "wealth:report:condition";
-    /**
-     * 本年度报表缓存
-     */
-    String BOX_REPORT_CURRENT_YEAR_CACHE = "wealth:report:currentYear";
 }
diff --git a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/FinanceReceiptApproveService.java b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/FinanceReceiptApproveService.java
index d9e7d051d9b85d1864207df5c3cff801f71c2ee7..6ae54fde72579c1658d3b2a2ff551d8797846435 100644
--- a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/FinanceReceiptApproveService.java
+++ b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/FinanceReceiptApproveService.java
@@ -5,6 +5,8 @@ import cn.iocoder.yudao.module.bpm.api.BpmCreateServiceFactory;
 import cn.iocoder.yudao.module.bpm.enums.BpmProcessInstanceResultEnum;
 import cn.iocoder.yudao.module.bpm.enums.WorkFlowEmus;
 import cn.iocoder.yudao.module.bpm.resp.TaskResp;
+import cn.iocoder.yudao.module.ecw.api.bank.BankApi;
+import cn.iocoder.yudao.module.ecw.api.bank.dto.BankAccountDTO;
 import cn.iocoder.yudao.module.wealth.dal.dataobject.receipt.ReceiptDO;
 import cn.iocoder.yudao.module.wealth.dal.dataobject.receiptApproval.ReceiptApprovalDO;
 import cn.iocoder.yudao.module.wealth.dal.dataobject.receiptItem.ReceiptItemDO;
@@ -57,6 +59,8 @@ public class FinanceReceiptApproveService {
     private ReceivableService receivableService;
     @Resource
     private ApplicationContext applicationContext;
+    @Resource
+    private BankApi bankApi;
 
     @Transactional
     public void financeApproveCallBack(String bmpKey, String businessKey, Integer result) {
@@ -158,6 +162,7 @@ public class FinanceReceiptApproveService {
                 List orderIds = orderList.stream().map(ReceivableDO::getOrderId).distinct().collect(Collectors.toList());
 
                 receivableService.orderReceivableWriteOffLogAdd(orderIds, receiptDO.getReceiptNo());
+                // TODO 更新核销误差兑额外费用主币种金额
 
             } else if (result == BpmProcessInstanceResultEnum.REJECT.getResult()) {
                 updateReceipt.setState(ReceiptStatusEnum.WRITE_OFF_PART_ING.getValue());
@@ -230,7 +235,7 @@ public class FinanceReceiptApproveService {
             updateWrapper.eq(ReceiptItemDO::getId, receiptItemDO.getId());
             updateWrapper.set(ReceiptItemDO::getBmpStatus, result);
             if (result == BpmProcessInstanceResultEnum.APPROVE.getResult()) {
-                updateWrapper.set(ReceiptItemDO::getStatus, ReceiptItemStatusEnum.WRITE_OFF.getValue());
+                updateWrapper.set(ReceiptItemDO::getStatus, ReceiptItemStatusEnum.DRAFT.getValue());
                 updateWrapper.set(ReceiptItemDO::getApprovalTime, null);
                 receiptItemMapper.update(null, updateWrapper);
                 //需要根据应收明细核销状态 变更成部分核销或者待核销
@@ -259,6 +264,13 @@ public class FinanceReceiptApproveService {
                 }
                 receivableService.updateBatchById(receivableDOS);
                 receiptService.updateReceiptItemStatus(receiptItemDO.getReceiptId());
+                // 更新银行账户余额
+                bankApi.updateBankAccountBalance(BankAccountDTO.builder()
+                        .id(receiptItemDO.getAccountId())
+                        .baAccountName(receiptItemDO.getAccountName())
+                        .baAccountNum(receiptItemDO.getAccountNo())
+                        .baBankName(receiptItemDO.getAccountBankName())
+                        .baBalance(receiptItemDO.getAmount()).build(), true);
             } else if (result == BpmProcessInstanceResultEnum.REJECT.getResult()) {
                 updateWrapper.set(ReceiptItemDO::getStatus, ReceiptItemStatusEnum.WRITE_OFF.getValue());
                 receiptItemMapper.update(null, updateWrapper);
@@ -267,7 +279,6 @@ public class FinanceReceiptApproveService {
                 receiptItemMapper.update(null, updateWrapper);
             }
             receiptService.recordLog(receiptItemDO.getReceiptId(), ReceiptLinkEnum.REJECT_BANK_RECEIPT, comment, WorkFlowEmus.FINANCE_RECEIPT_ITEM_WRITE_OFF_NO.getValue());
-            // TODO 更新银行账号余额
         }
         ReceiptApprovalDO updateReceiptApproval = new ReceiptApprovalDO();
         updateReceiptApproval.setId(receiptApprovalDO.getId());
diff --git a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receipt/ReceiptServiceImpl.java b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receipt/ReceiptServiceImpl.java
index 48af83598b6d559b27895312d1d207a8797599cc..0303f959bb524a2f742951463f31aa0a1e22f196 100644
--- a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receipt/ReceiptServiceImpl.java
+++ b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receipt/ReceiptServiceImpl.java
@@ -844,7 +844,6 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
         update.setState(ReceiptStatusEnum.APPROVE_NEGATION.getValue());
         update.setBmpId(bpmId);
         receiptMapper.updateById(update);
-        //recordLog(update.getId(), ReceiptLinkEnum.REJECT_RECEIPT, financeReceiptVo.getRemark(), WorkFlowEmus.FINANCE_RECEIPT_APPROVE_NO.getValue());
     }
 
     @Override
@@ -876,7 +875,7 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
         if (null == currencyId) {
             throw exception(RECEIPT_CURRENCY_NOT_EXISTS);
         }
-        if (totalAmount.compareTo(receiptDO.getReceivableTotalAmount()) == -1) {
+        if (totalAmount.compareTo(receiptDO.getReceivableTotalAmount()) < 0) {
             DictDataRespDTO dictDataRespDTO = dictDataApi.parseDictDataFromCache("write_off_diff", String.valueOf(currencyId));
             if (null == dictDataRespDTO) {
                 throw exception(RECEIPT_CURRENCY_DIFF_NOT_EXISTS);
@@ -940,7 +939,6 @@ public class ReceiptServiceImpl extends AbstractService<ReceiptMapper, ReceiptDO
         update.setState(ReceiptStatusEnum.WRITE_OFF_ALL_NEGATION.getValue());
         update.setBmpId(bpmId);
         receiptMapper.updateById(update);
-        recordLog(update.getId(), ReceiptLinkEnum.REJECT_WRITE_OFF_RECEIPT, financeReceiptVo.getRemark(), update.getBmpId());
     }
 
     @Override
diff --git a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/BankReceiptDetailsImpl.java b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/BankReceiptDetailsImpl.java
index 22cef7adafe015fc61ad066712aec6bb664abdde..e7382c76f1b8381c3a82456823969f9742c3b84e 100644
--- a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/BankReceiptDetailsImpl.java
+++ b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/BankReceiptDetailsImpl.java
@@ -87,7 +87,7 @@ public class BankReceiptDetailsImpl implements BankReceiptDetailsService {
             if (accountBalanceMap.containsKey(record.getAccountNo())) {
                 record.setAccountBalance(accountBalanceMap.get(record.getAccountNo()));
             } else {
-                record.setAccountBalance(bankReceiptDetailsMapper.calculateAccountBalance(record.getAccountNo()));
+                record.setAccountBalance(bankReceiptDetailsMapper.calculateAccountBalance(record.getAccountId()));
                 accountBalanceMap.put(record.getAccountNo(), record.getAccountBalance());
             }
             List<ReceiptRelationOrderInfoVO> orderInfoByReceiptId = receiptMapper.getOrderInfoByReceiptId(Long.parseLong(record.getReceiptId()));
diff --git a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemService.java b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemService.java
index 1900a8de1e3d9f74f07fd2cd8d0466f3f32b81b1..1ec20949bc33827b4fc044446792a00d9be612fa 100644
--- a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemService.java
+++ b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemService.java
@@ -28,7 +28,7 @@ public interface ReceiptItemService extends IService<ReceiptItemDO> {
      * @param createReqVO 创建信息
      * @return 编号
      */
-    Long createReceiptItem(@Valid ReceiptItemCreateReqVO createReqVO);
+    Long createReceiptItem(@Valid ReceiptItemCreateReqVO createReqVO,boolean isBatch);
 
     /**
      * 更新收款单明细
diff --git a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemServiceImpl.java b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemServiceImpl.java
index 848162f3698784d508849001513778c96d21191a..dc529cdb0f68af44fd72a7c5bf8e4a76e22a56ff 100644
--- a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemServiceImpl.java
+++ b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receiptItem/ReceiptItemServiceImpl.java
@@ -116,7 +116,7 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public Long createReceiptItem(ReceiptItemCreateReqVO createReqVO) {
+    public Long createReceiptItem(ReceiptItemCreateReqVO createReqVO, boolean isBatch) {
         ReceiptDO receiptDO = validateCreateVO(createReqVO);
         // 插入收款明细
         ReceiptItemDO receiptItem = ReceiptItemConvert.INSTANCE.convert(createReqVO);
@@ -141,7 +141,9 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
             receiptService.updateById(update);
         }
         receiptService.updateReceiptItemStatus(receiptItem.getReceiptId());
-        receiptItemAutoApprove(receiptItem, receiptDO.getReceiptNo());
+        if (isBatch) {
+            receiptItemAutoApprove(receiptItem, receiptDO.getReceiptNo());
+        }
         // 返回
         return receiptItem.getId();
     }
@@ -247,13 +249,7 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
     @Transactional(rollbackFor = Exception.class)
     public void verification(Long id, Integer bpmResult, String comment) {
         //收款单明细核销审核
-        if (null == id) {
-            throw exception(RECEIPT_ITEM_NOT_FOUND);
-        }
         ReceiptItemDO receiptItemDO = receiptItemMapper.selectById(id);
-        if (null == receiptItemDO) {
-            throw exception(RECEIPT_ITEM_NOT_FOUND);
-        }
         receiptItemDO.setBmpStatus(bpmResult);
         // 核销通过
         if (Objects.equals(bpmResult, BpmProcessInstanceResultEnum.APPROVE.getResult())) {
@@ -262,10 +258,7 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
 
             // 更新收款单
             ReceiptDO receiptDO = receiptMapper.selectById(receiptItemDO.getReceiptId());
-            if (null == receiptDO) {
-                throw exception(RECEIPT_NOT_EXISTS);
-            }
-            //判断收款单状态如果是待核销状态-变成部分核销状态,其它 状态不变
+            //判断收款单状态如果是待提交状态-变成部分核销状态,其它 状态不变
             if (receiptDO.getState().equals(ReceiptStatusEnum.WRITE_OFF_WAITING.getValue())) {
                 receiptDO.setState(ReceiptStatusEnum.WRITE_OFF_PART_ING.getValue());
             }
@@ -274,7 +267,11 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
             if (null != receiptDO.getReceivableTotalAmount() && receiptDO.getReceivableTotalAmount().compareTo(BigDecimal.ZERO) > 0) {
                 receiptDO.setWriteOffProportion(writeOffAmount.divide(receiptDO.getReceivableTotalAmount(), 8, RoundingMode.HALF_UP).multiply(new BigDecimal("100")).setScale(6, BigDecimal.ROUND_HALF_UP));
             }
-            receiptService.updateById(receiptDO);
+            try {
+                receiptService.updateById(receiptDO);
+            } catch (Exception e) {
+                log.error("更新收款单状态失败", e);
+            }
             //更新应收明细
             List<ReceivableDO> receivableDOS = receivableService.selectList("receipt_id", receiptItemDO.getReceiptId());
             for (ReceivableDO receivableDO : receivableDOS) {
@@ -282,13 +279,15 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
                 ReceivableWriteOffRecordDO receivableWriteOffRecordDO = receivableService.getReceivableWriteOffRecord(receivableDO.getId(), receiptItemDO.getId());
                 if (null != receivableWriteOffRecordDO) {
                     BigDecimal writeOffCurrent = receivableWriteOffRecordDO.getWriteOffAmount().divide(receivableDO.getExchangeRate(), 4, RoundingMode.HALF_UP);
-                    receivableDO.setWriteOffAmount(receivableDO.getWriteOffAmount().add(writeOffCurrent));
+                    BigDecimal oldWriteOffAmount = receivableDO.getWriteOffAmount() == null ? BigDecimal.ZERO : receivableDO.getWriteOffAmount();
+                    receivableDO.setWriteOffAmount(oldWriteOffAmount.add(writeOffCurrent));
                 }
             }
             receivableService.updateBatchById(receivableDOS);
             receiptService.updateReceiptItemStatus(receiptItemDO.getReceiptId());
             // 更新银行账户余额
             bankApi.updateBankAccountBalance(BankAccountDTO.builder()
+                    .id(receiptItemDO.getAccountId())
                     .baAccountName(receiptItemDO.getAccountName())
                     .baAccountNum(receiptItemDO.getAccountNo())
                     .baBankName(receiptItemDO.getAccountBankName())
@@ -692,7 +691,7 @@ public class ReceiptItemServiceImpl extends AbstractService<ReceiptItemMapper, R
             List<ReceivableWriteOffReqVO> receivableWriteOffList = getReceiptItemDetail(listForCreateReceiptItem, receiptItemCreateReqVO);
             receiptItemCreateReqVO.setReceivableWriteOffList(receivableWriteOffList);
             // 插入数据
-            Long receiptItemId = proxy.createReceiptItem(receiptItemCreateReqVO);
+            Long receiptItemId = proxy.createReceiptItem(receiptItemCreateReqVO, true);
             ReceiptItemDO receiptItemDO = receiptItemMapper.selectById(receiptItemId);
             if (receiptItemDO.getBmpId() == null) {
                 this.createFinanceReceiptItemWriteOff(FinanceReceiptItemVo.builder()
diff --git a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receivable/ReceivableServiceImpl.java b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receivable/ReceivableServiceImpl.java
index c50024c29e9571d5e70125e6a6c17d5e78124d85..ccff7a4332af45905efc5f2cf7847fad8944dd8d 100644
--- a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receivable/ReceivableServiceImpl.java
+++ b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/service/receivable/ReceivableServiceImpl.java
@@ -1,7 +1,6 @@
 package cn.iocoder.yudao.module.wealth.service.receivable;
 
 import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.date.DateUtil;
 import cn.iocoder.boot.module.order.api.OrderApi;
 import cn.iocoder.yudao.framework.apollo.core.event.Order.OrderOperateLogEvent;
 import cn.iocoder.yudao.framework.apollo.core.vo.ApplyInfoVO;
@@ -45,9 +44,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.jetbrains.annotations.NotNull;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.annotation.Lazy;
-import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.validation.annotation.Validated;
@@ -120,6 +120,8 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
         RegionDTO regionInfo = regionApi.getRegionById(countryId);
         if (regionInfo != null) {
             receivable.setBaseCurrencyId(Long.parseLong(regionInfo.getImportCurrency5()));
+            BigDecimal baseAmount = currencyApi.getCurrencyRate(receivable.getCurrencyId(), receivable.getBaseCurrencyId()).getCurrencyRate().multiply(receivable.getTotalAmount());
+            receivable.setBaseAmount(baseAmount);
             int feeType = getFeeType(receivable.getFeeType());
             // 运费
             if (feeType == 0) {
@@ -724,17 +726,9 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
 
     @Override
     public ReceivableBoxReportVO getReceivableBoxReport(ReceivableBoxReportQueryVO query, PageVO page) {
+        assembleBoxReportQuery(query);
         // 打开页面默认选择到港时间为本年度的数据,按结算时间倒序,卸柜/到仓时间倒序,清关时间倒序,到港时间倒序
         ReceivableBoxReportVO receivableBoxReport = null;
-        Boolean isCurrentYearQuery = query.isEmpty();
-        if (isCurrentYearQuery) {
-            String currentYearVOCache = redisHelper.get(BOX_REPORT_CURRENT_YEAR_CACHE);
-            if (currentYearVOCache != null) {
-                receivableBoxReport = JSON.parseObject(currentYearVOCache, ReceivableBoxReportVO.class);
-            }
-            query.setBeginDaogangTime(DateUtil.beginOfYear(new Date()));
-            query.setEndDaogangTime(new Date());
-        }
         // 查询报表缓存
         String queryJson = JSON.toJSONString(query);
         if (!query.getForceUpdateCache() && receivableBoxReport == null) {
@@ -748,7 +742,15 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
             receivableBoxReport.setPage(page.getPage().longValue());
             receivableBoxReport.setRows((long) page.getRows());
             List<ReceivableBoxReportPageVO> records = receivableMapper.getReceivableBoxPage(query);
-            List<ReceivableBoxReportPageVO> pageVOList = records.subList(page.getPage() - 1, Math.min(page.getPage() * page.getRows(), records.size()));
+            records = records.stream()
+                    .sorted(Comparator.comparing(ReceivableBoxReportPageVO::getSlSettledTime, Comparator.nullsLast(query.getJsTimeDesc() ? (Comparator<Date>) Comparator.reverseOrder() : (Comparator<Date>) Comparator.naturalOrder()))
+                            .thenComparing(ReceivableBoxReportPageVO::getUlWarehouseTime, Comparator.nullsLast(query.getUlWarehouseTimeDesc() ? (Comparator<Date>) Comparator.reverseOrder() : (Comparator<Date>) Comparator.naturalOrder()))
+                            .thenComparing(ReceivableBoxReportPageVO::getQgDate, Comparator.nullsLast(query.getQingguanTimeDesc() ? (Comparator<Date>) Comparator.reverseOrder() : (Comparator<Date>) Comparator.naturalOrder()))
+                            .thenComparing(ReceivableBoxReportPageVO::getDgDate, Comparator.nullsLast(query.getDaogangTimeDesc() ? (Comparator<Date>) Comparator.reverseOrder() : (Comparator<Date>) Comparator.naturalOrder())))
+                    .collect(Collectors.toList());
+            int startIndex = Math.max(0, (page.getPage() - 1) * page.getRows());
+            int endIndex = Math.min(startIndex + page.getRows(), records.size());
+            List<ReceivableBoxReportPageVO> pageVOList = records.subList(startIndex, endIndex);
             if (CollectionUtil.isEmpty(records) || CollectionUtil.isEmpty(pageVOList)) {
                 receivableBoxReport.setList(pageVOList);
                 return receivableBoxReport;
@@ -760,19 +762,23 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
             Map<Integer, CurrencyRespDTO> allCurrency = currencyApi.getAllCurrency();
             List<ExchangeRateRespDTO> allCurrencyRate = currencyApi.getAllCurrencyRate();
             ReceivableBoxReportVO.Amount pageAmount = new ReceivableBoxReportVO.Amount();
-            assembleReportAmount(pageVOList, relationOrderMap, allCurrencyRate, allCurrency, null, pageVOList, pageAmount);
+            assembleReportAmount(query.getForceUpdateCache(), pageVOList, relationOrderMap, allCurrencyRate, allCurrency, null, pageVOList, pageAmount);
             receivableBoxReport.setList(pageVOList);
+            receivableBoxReport.setPageAmount(pageAmount);
             redisHelper.set(BOX_REPORT_QUERY_CACHE, JSON.toJSONString(receivableBoxReport));
             return receivableBoxReport;
         }
         // 该查询条件所有的自编号列表
         List<ReceivableBoxReportPageVO> records = receivableMapper.getReceivableBoxPage(query);
-        // 按查询条件排序
-        //records.sort(Comparator.comparing(ReceivableBoxReportPageVO::getSlSettledTime).reversed()
-        //        .thenComparing(ReceivableBoxReportPageVO::getUlWarehouseTime).reversed()
-        //        .thenComparing(ReceivableBoxReportPageVO::getQgDate).reversed()
-        //        .thenComparing(ReceivableBoxReportPageVO::getDgDate).reversed());
-        List<ReceivableBoxReportPageVO> pageVOList = records.subList(page.getPage() - 1, Math.min(page.getPage() * page.getRows(), records.size()));
+        records = records.stream()
+                .sorted(Comparator.comparing(ReceivableBoxReportPageVO::getSlSettledTime, Comparator.nullsLast(query.getJsTimeDesc() ? (Comparator<Date>) Comparator.reverseOrder() : (Comparator<Date>) Comparator.naturalOrder()))
+                        .thenComparing(ReceivableBoxReportPageVO::getUlWarehouseTime, Comparator.nullsLast(query.getUlWarehouseTimeDesc() ? (Comparator<Date>) Comparator.reverseOrder() : (Comparator<Date>) Comparator.naturalOrder()))
+                        .thenComparing(ReceivableBoxReportPageVO::getQgDate, Comparator.nullsLast(query.getQingguanTimeDesc() ? (Comparator<Date>) Comparator.reverseOrder() : (Comparator<Date>) Comparator.naturalOrder()))
+                        .thenComparing(ReceivableBoxReportPageVO::getDgDate, Comparator.nullsLast(query.getDaogangTimeDesc() ? (Comparator<Date>) Comparator.reverseOrder() : (Comparator<Date>) Comparator.naturalOrder())))
+                .collect(Collectors.toList());
+        int startIndex = Math.max(0, (page.getPage() - 1) * page.getRows());
+        int endIndex = Math.min(startIndex + page.getRows(), records.size());
+        List<ReceivableBoxReportPageVO> pageVOList = records.subList(startIndex, endIndex);
         ReceivableBoxReportVO.ReceivableBoxReportVOBuilder voBuilder = ReceivableBoxReportVO.builder()
                 .list(pageVOList)
                 .total((long) records.size())
@@ -790,20 +796,28 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
         List<ExchangeRateRespDTO> allCurrencyRate = currencyApi.getAllCurrencyRate();
         ReceivableBoxReportVO.Amount pageAmount = new ReceivableBoxReportVO.Amount();
         ReceivableBoxReportVO.Amount queryAmount = new ReceivableBoxReportVO.Amount();
-        assembleReportAmount(records, relationOrderMap, allCurrencyRate, allCurrency, queryAmount, pageVOList, pageAmount);
+        assembleReportAmount(query.getForceUpdateCache(),records, relationOrderMap, allCurrencyRate, allCurrency, queryAmount, pageVOList, pageAmount);
         ReceivableBoxReportVO reportVO = voBuilder
                 .pageAmount(pageAmount)
                 .queryAmount(queryAmount)
                 .build();
-        if (isCurrentYearQuery) {
-            redisHelper.set(BOX_REPORT_CURRENT_YEAR_CACHE, JSON.toJSONString(reportVO));
-        } else {
-            redisHelper.set(BOX_REPORT_QUERY_CONDITION_CACHE, queryJson);
-            redisHelper.set(BOX_REPORT_QUERY_CACHE, JSON.toJSONString(reportVO));
-        }
+
+        redisHelper.set(BOX_REPORT_QUERY_CONDITION_CACHE, queryJson, 60 * 60);
+        redisHelper.set(BOX_REPORT_QUERY_CACHE, JSON.toJSONString(reportVO), 60 * 60);
         return reportVO;
     }
 
+    private void assembleBoxReportQuery(ReceivableBoxReportQueryVO query) {
+        if (StringUtils.isNotBlank(query.getSelfNo()) && (query.getSelfNo().contains(",") || query.getSelfNo().contains(","))) {
+            String[] selfNoArray = query.getSelfNo().split(",");
+            query.setSelfNoList(Arrays.asList(selfNoArray));
+            query.setSelfNo(null);
+        }
+        if (CollectionUtil.isNotEmpty(query.getDestCity()) && CollectionUtil.isEmpty(query.getDestWarehouseIdList())) {
+            query.setDestWarehouseIdList(receivableMapper.getDestWarehouseIdListByDestCity(query.getDestCity()));
+        }
+    }
+
     /**
      * 整合报表金额数据
      *
@@ -816,12 +830,12 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
      * @param pageAmount
      */
 
-    private void assembleReportAmount(List<ReceivableBoxReportPageVO> records, Map<Long, List<ReceivebleBoxRelationOrder>> relationOrderMap, List<ExchangeRateRespDTO> allCurrencyRate, Map<Integer, CurrencyRespDTO> allCurrency, ReceivableBoxReportVO.Amount queryAmount, List<ReceivableBoxReportPageVO> pageVOList, ReceivableBoxReportVO.Amount pageAmount) {
+    private void assembleReportAmount(boolean forceUpdateCache, List<ReceivableBoxReportPageVO> records, Map<Long, List<ReceivebleBoxRelationOrder>> relationOrderMap, List<ExchangeRateRespDTO> allCurrencyRate, Map<Integer, CurrencyRespDTO> allCurrency, ReceivableBoxReportVO.Amount queryAmount, List<ReceivableBoxReportPageVO> pageVOList, ReceivableBoxReportVO.Amount pageAmount) {
         for (ReceivableBoxReportPageVO record : records) {
             setLadingBillStatus(record);
             ReceivableBoxAmount receivableBoxAmount;
             String receivableBoxAmountCache = redisHelper.get(BOX_AMOUNT_CACHE + record.getId());
-            if (receivableBoxAmountCache != null) {
+            if (receivableBoxAmountCache != null && !forceUpdateCache) {
                 receivableBoxAmount = JSONObject.parseObject(receivableBoxAmountCache, ReceivableBoxAmount.class);
             } else {
                 List<ReceivebleBoxRelationOrder> orders = relationOrderMap.get(record.getId());
@@ -914,12 +928,6 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
         return null;
     }
 
-    @Scheduled(cron = "0 0 0 * * ?")
-    public void updateBoxAmountCacheScheduled() {
-        List<Long> boxIds = receivableMapper.getAllBoxId();
-        updateBoxAmountCache(boxIds, true);
-    }
-
     /**
      * 计算自编号收款
      *
@@ -937,8 +945,22 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
         Long receivableCurrency = Long.valueOf(regionInfo.getImportCurrency5());
 
         ReceivableBoxAmount receivableBoxAmount = new ReceivableBoxAmount(freightCurrency, clearanceCurrency, otherFeeCurrency, otherSubCurrency, receivableCurrency);
-
+        ReceivableCurrencyAmount receivableBaseCurrency = receivableBoxAmount.getReceivableBaseCurrency();
+        ReceivableCurrencyAmount receivableBaseCurrencySettle = receivableBoxAmount.getReceivableBaseCurrencySettle();
         for (ReceivableDO boxReceivable : boxReceivables) {
+            List<ReceivableIncomeBelong> receivableIncomeBelongs = receivableIncomeBelongMap.get(boxReceivable.getId());
+            BigDecimal baseCurrencyAmount;
+            if (boxReceivable.getBaseAmount() == null) {
+                BigDecimal exchangeRate = getExchangeRate(allCurrencyRate, boxReceivable.getCurrencyId(), boxReceivable.getBaseCurrencyId());
+                baseCurrencyAmount = boxReceivable.getTotalAmount().multiply(exchangeRate);
+            } else {
+                baseCurrencyAmount = boxReceivable.getBaseAmount();
+            }
+            receivableBaseCurrency.addAmount(baseCurrencyAmount);
+            if (CollectionUtil.isNotEmpty(receivableIncomeBelongs)) {
+                BigDecimal writeOffBaseAmount = receivableIncomeBelongs.stream().map(ReceivableIncomeBelong::getWriteOffBaseAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
+                receivableBaseCurrencySettle.addAmount(writeOffBaseAmount);
+            }
             // 应收款-汇总
             ReceivableCurrencyAmount currencyAmount = new ReceivableCurrencyAmount(boxReceivable.getCurrencyId(), boxReceivable.getTaxAmount() == null ? boxReceivable.getTotalAmount() : boxReceivable.getTaxAmount().subtract(boxReceivable.getDiscountTotal() == null ? BigDecimal.ZERO : boxReceivable.getDiscountTotal()));
             int index = receivableBoxAmount.receivableTotalSummary.indexOf(currencyAmount);
@@ -963,7 +985,6 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
             BigDecimal clearanceRate = getExchangeRate(allCurrencyRate, boxReceivable.getCurrencyId(), clearanceCurrency);
             BigDecimal otherFeeRate = getExchangeRate(allCurrencyRate, boxReceivable.getCurrencyId(), otherFeeCurrency);
             BigDecimal otherSubRate = getExchangeRate(allCurrencyRate, freightCurrency, otherSubCurrency);
-            List<ReceivableIncomeBelong> receivableIncomeBelongs = receivableIncomeBelongMap.get(boxReceivable.getId());
             switch (feeType) {
                 case 0:
                     if (boxReceivable.getCurrencyId().equals(freightCurrency)) {
@@ -1043,116 +1064,116 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
             if (pageReceivableTotalSummary.contains(receivableCurrencyAmount)) {
                 pageReceivableTotalSummary.get(pageReceivableTotalSummary.indexOf(receivableCurrencyAmount)).addAmount(receivableCurrencyAmount.getAmount());
             } else {
-                pageReceivableTotalSummary.add(receivableCurrencyAmount);
+                pageReceivableTotalSummary.add(receivableCurrencyAmount.clone());
             }
         }
         List<ReceivableCurrencyAmount> pageReceivableTotalSettle = resAmount.getReceivableTotalSettle();
         if (pageReceivableTotalSettle.contains(receivableBoxAmount.receivableTotalSettle)) {
             pageReceivableTotalSettle.get(pageReceivableTotalSettle.indexOf(receivableBoxAmount.receivableTotalSettle)).addAmount(receivableBoxAmount.receivableTotalSettle.getAmount());
         } else {
-            pageReceivableTotalSettle.add(receivableBoxAmount.receivableTotalSettle);
+            pageReceivableTotalSettle.add(receivableBoxAmount.receivableTotalSettle.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableDetailFreight = resAmount.getReceivableDetailFreight();
         if (pageReceivableDetailFreight.contains(receivableBoxAmount.receivableDetailFreight)) {
             pageReceivableDetailFreight.get(pageReceivableDetailFreight.indexOf(receivableBoxAmount.receivableDetailFreight)).addAmount(receivableBoxAmount.receivableDetailFreight.getAmount());
         } else {
-            pageReceivableDetailFreight.add(receivableBoxAmount.receivableDetailFreight);
+            pageReceivableDetailFreight.add(receivableBoxAmount.receivableDetailFreight.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableDetailClearance = resAmount.getReceivableDetailClearance();
         if (pageReceivableDetailClearance.contains(receivableBoxAmount.receivableDetailClearance)) {
             pageReceivableDetailClearance.get(pageReceivableDetailClearance.indexOf(receivableBoxAmount.receivableDetailClearance)).addAmount(receivableBoxAmount.receivableDetailClearance.getAmount());
         } else {
-            pageReceivableDetailClearance.add(receivableBoxAmount.receivableDetailClearance);
+            pageReceivableDetailClearance.add(receivableBoxAmount.receivableDetailClearance.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableDetailOtherFee = resAmount.getReceivableDetailOtherFee();
         if (pageReceivableDetailOtherFee.contains(receivableBoxAmount.receivableDetailOtherFee)) {
             pageReceivableDetailOtherFee.get(pageReceivableDetailOtherFee.indexOf(receivableBoxAmount.receivableDetailOtherFee)).addAmount(receivableBoxAmount.receivableDetailOtherFee.getAmount());
         } else {
-            pageReceivableDetailOtherFee.add(receivableBoxAmount.receivableDetailOtherFee);
+            pageReceivableDetailOtherFee.add(receivableBoxAmount.receivableDetailOtherFee.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableDestCountryFreight = resAmount.getReceivableDestCountryFreight();
         if (pageReceivableDestCountryFreight.contains(receivableBoxAmount.receivableDestCountryFreight)) {
             pageReceivableDestCountryFreight.get(pageReceivableDestCountryFreight.indexOf(receivableBoxAmount.receivableDestCountryFreight)).addAmount(receivableBoxAmount.receivableDestCountryFreight.getAmount());
         } else {
-            pageReceivableDestCountryFreight.add(receivableBoxAmount.receivableDestCountryFreight);
+            pageReceivableDestCountryFreight.add(receivableBoxAmount.receivableDestCountryFreight.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableDestCountryClearance = resAmount.getReceivableDestCountryClearance();
         if (pageReceivableDestCountryClearance.contains(receivableBoxAmount.receivableDestCountryClearance)) {
             pageReceivableDestCountryClearance.get(pageReceivableDestCountryClearance.indexOf(receivableBoxAmount.receivableDestCountryClearance)).addAmount(receivableBoxAmount.receivableDestCountryClearance.getAmount());
         } else {
-            pageReceivableDestCountryClearance.add(receivableBoxAmount.receivableDestCountryClearance);
+            pageReceivableDestCountryClearance.add(receivableBoxAmount.receivableDestCountryClearance.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableDestCountryOtherFee = resAmount.getReceivableDestCountryOtherFee();
         if (pageReceivableDestCountryOtherFee.contains(receivableBoxAmount.receivableDestCountryOtherFee)) {
             pageReceivableDestCountryOtherFee.get(pageReceivableDestCountryOtherFee.indexOf(receivableBoxAmount.receivableDestCountryOtherFee)).addAmount(receivableBoxAmount.receivableDestCountryOtherFee.getAmount());
         } else {
-            pageReceivableDestCountryOtherFee.add(receivableBoxAmount.receivableDestCountryOtherFee);
+            pageReceivableDestCountryOtherFee.add(receivableBoxAmount.receivableDestCountryOtherFee.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableDestCountryOtherFeeSub = resAmount.getReceivableDestCountryOtherFeeSub();
         if (pageReceivableDestCountryOtherFeeSub.contains(receivableBoxAmount.receivableDestCountryOtherFeeSub)) {
             pageReceivableDestCountryOtherFeeSub.get(pageReceivableDestCountryOtherFeeSub.indexOf(receivableBoxAmount.receivableDestCountryOtherFeeSub)).addAmount(receivableBoxAmount.receivableDestCountryOtherFeeSub.getAmount());
         } else {
-            pageReceivableDestCountryOtherFeeSub.add(receivableBoxAmount.receivableDestCountryOtherFeeSub);
+            pageReceivableDestCountryOtherFeeSub.add(receivableBoxAmount.receivableDestCountryOtherFeeSub.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableStartCountryFreight = resAmount.getReceivableStartCountryFreight();
         if (pageReceivableStartCountryFreight.contains(receivableBoxAmount.receivableStartCountryFreight)) {
             pageReceivableStartCountryFreight.get(pageReceivableStartCountryFreight.indexOf(receivableBoxAmount.receivableStartCountryFreight)).addAmount(receivableBoxAmount.receivableStartCountryFreight.getAmount());
         } else {
-            pageReceivableStartCountryFreight.add(receivableBoxAmount.receivableStartCountryFreight);
+            pageReceivableStartCountryFreight.add(receivableBoxAmount.receivableStartCountryFreight.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableStartCountryClearance = resAmount.getReceivableStartCountryClearance();
         if (pageReceivableStartCountryClearance.contains(receivableBoxAmount.receivableStartCountryClearance)) {
             pageReceivableStartCountryClearance.get(pageReceivableStartCountryClearance.indexOf(receivableBoxAmount.receivableStartCountryClearance)).addAmount(receivableBoxAmount.receivableStartCountryClearance.getAmount());
         } else {
-            pageReceivableStartCountryClearance.add(receivableBoxAmount.receivableStartCountryClearance);
+            pageReceivableStartCountryClearance.add(receivableBoxAmount.receivableStartCountryClearance.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableStartCountryOtherFee = resAmount.getReceivableStartCountryOtherFee();
         if (pageReceivableStartCountryOtherFee.contains(receivableBoxAmount.receivableStartCountryOtherFee)) {
             pageReceivableStartCountryOtherFee.get(pageReceivableStartCountryOtherFee.indexOf(receivableBoxAmount.receivableStartCountryOtherFee)).addAmount(receivableBoxAmount.receivableStartCountryOtherFee.getAmount());
         } else {
-            pageReceivableStartCountryOtherFee.add(receivableBoxAmount.receivableStartCountryOtherFee);
+            pageReceivableStartCountryOtherFee.add(receivableBoxAmount.receivableStartCountryOtherFee.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableStartCountryOtherFeeSub = resAmount.getReceivableStartCountryOtherFeeSub();
         if (pageReceivableStartCountryOtherFeeSub.contains(receivableBoxAmount.receivableStartCountryOtherFeeSub)) {
             pageReceivableStartCountryOtherFeeSub.get(pageReceivableStartCountryOtherFeeSub.indexOf(receivableBoxAmount.receivableStartCountryOtherFeeSub)).addAmount(receivableBoxAmount.receivableStartCountryOtherFeeSub.getAmount());
         } else {
-            pageReceivableStartCountryOtherFeeSub.add(receivableBoxAmount.receivableStartCountryOtherFeeSub);
+            pageReceivableStartCountryOtherFeeSub.add(receivableBoxAmount.receivableStartCountryOtherFeeSub.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableDiscountFreight = resAmount.getReceivableDiscountFreight();
         if (pageReceivableDiscountFreight.contains(receivableBoxAmount.receivableDiscountFreight)) {
             pageReceivableDiscountFreight.get(pageReceivableDiscountFreight.indexOf(receivableBoxAmount.receivableDiscountFreight)).addAmount(receivableBoxAmount.receivableDiscountFreight.getAmount());
         } else {
-            pageReceivableDiscountFreight.add(receivableBoxAmount.receivableDiscountFreight);
+            pageReceivableDiscountFreight.add(receivableBoxAmount.receivableDiscountFreight.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableDiscountClearance = resAmount.getReceivableDiscountClearance();
         if (pageReceivableDiscountClearance.contains(receivableBoxAmount.receivableDiscountClearance)) {
             pageReceivableDiscountClearance.get(pageReceivableDiscountClearance.indexOf(receivableBoxAmount.receivableDiscountClearance)).addAmount(receivableBoxAmount.receivableDiscountClearance.getAmount());
         } else {
-            pageReceivableDiscountClearance.add(receivableBoxAmount.receivableDiscountClearance);
+            pageReceivableDiscountClearance.add(receivableBoxAmount.receivableDiscountClearance.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableDiscountOtherFee = resAmount.getReceivableDiscountOtherFee();
         if (pageReceivableDiscountOtherFee.contains(receivableBoxAmount.receivableDiscountOtherFee)) {
             pageReceivableDiscountOtherFee.get(pageReceivableDiscountOtherFee.indexOf(receivableBoxAmount.receivableDiscountOtherFee)).addAmount(receivableBoxAmount.receivableDiscountOtherFee.getAmount());
         } else {
-            pageReceivableDiscountOtherFee.add(receivableBoxAmount.receivableDiscountOtherFee);
+            pageReceivableDiscountOtherFee.add(receivableBoxAmount.receivableDiscountOtherFee.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableUnsettledFreight = resAmount.getReceivableUnsettledFreight();
         if (pageReceivableUnsettledFreight.contains(receivableBoxAmount.receivableUnsettledFreight)) {
             pageReceivableUnsettledFreight.get(pageReceivableUnsettledFreight.indexOf(receivableBoxAmount.receivableUnsettledFreight)).addAmount(receivableBoxAmount.receivableUnsettledFreight.getAmount());
         } else {
-            pageReceivableUnsettledFreight.add(receivableBoxAmount.receivableUnsettledFreight);
+            pageReceivableUnsettledFreight.add(receivableBoxAmount.receivableUnsettledFreight.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableUnsettledClearance = resAmount.getReceivableUnsettledClearance();
         if (pageReceivableUnsettledClearance.contains(receivableBoxAmount.receivableUnsettledClearance)) {
             pageReceivableUnsettledClearance.get(pageReceivableUnsettledClearance.indexOf(receivableBoxAmount.receivableUnsettledClearance)).addAmount(receivableBoxAmount.receivableUnsettledClearance.getAmount());
         } else {
-            pageReceivableUnsettledClearance.add(receivableBoxAmount.receivableUnsettledClearance);
+            pageReceivableUnsettledClearance.add(receivableBoxAmount.receivableUnsettledClearance.clone());
         }
         List<ReceivableCurrencyAmount> pageReceivableUnsettledOtherFee = resAmount.getReceivableUnsettledOtherFee();
         if (pageReceivableUnsettledOtherFee.contains(receivableBoxAmount.receivableUnsettledOtherFee)) {
             pageReceivableUnsettledOtherFee.get(pageReceivableUnsettledOtherFee.indexOf(receivableBoxAmount.receivableUnsettledOtherFee)).addAmount(receivableBoxAmount.receivableUnsettledOtherFee.getAmount());
         } else {
-            pageReceivableUnsettledOtherFee.add(receivableBoxAmount.receivableUnsettledOtherFee);
+            pageReceivableUnsettledOtherFee.add(receivableBoxAmount.receivableUnsettledOtherFee.clone());
         }
     }
 
@@ -1183,6 +1204,24 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
         record.setReceivableUnsettledFreight(allCurrency.get(receivableBoxAmount.receivableUnsettledFreight.getCurrencyId().intValue()).getFuhao() + " " + receivableBoxAmount.receivableUnsettledFreight.getAmount());
         record.setReceivableUnsettledClearance(allCurrency.get(receivableBoxAmount.receivableUnsettledClearance.getCurrencyId().intValue()).getFuhao() + " " + receivableBoxAmount.receivableUnsettledClearance.getAmount());
         record.setReceivableUnsettledOtherFee(allCurrency.get(receivableBoxAmount.receivableUnsettledOtherFee.getCurrencyId().intValue()).getFuhao() + " " + receivableBoxAmount.receivableUnsettledOtherFee.getAmount());
+
+        String writeOffPercent = getWriteOffPercent(receivableBoxAmount);
+        record.setWriteOffPercent(writeOffPercent);
+    }
+
+    private static @NotNull String getWriteOffPercent(ReceivableBoxAmount receivableBoxAmount) {
+        if (receivableBoxAmount.getReceivableBaseCurrency() == null || receivableBoxAmount.getReceivableBaseCurrencySettle() == null) {
+            return "0.00%";
+        }
+        BigDecimal receivableBaseCurrency = receivableBoxAmount.getReceivableBaseCurrency().getAmount();
+        BigDecimal receivableBaseCurrencySettle = receivableBoxAmount.getReceivableBaseCurrencySettle().getAmount();
+        String writeOffPercent;
+        if (receivableBaseCurrency.compareTo(BigDecimal.ZERO) == 0 || receivableBaseCurrencySettle.compareTo(BigDecimal.ZERO) == 0) {
+            writeOffPercent = "0.00%";
+        } else {
+            writeOffPercent = receivableBaseCurrencySettle.divide(receivableBaseCurrency, 4, RoundingMode.HALF_UP).multiply(new BigDecimal("100")) + "%";
+        }
+        return writeOffPercent;
     }
 
     /**
@@ -1266,6 +1305,11 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
         private ReceivableCurrencyAmount receivableDestCountryOtherFee;
         private ReceivableCurrencyAmount receivableDestCountryOtherFeeSub;
 
+        // 基准币种应收
+        private ReceivableCurrencyAmount receivableBaseCurrency;
+        // 基准币种实收
+        private ReceivableCurrencyAmount receivableBaseCurrencySettle;
+
         public ReceivableBoxAmount(Long freightCurrency, Long clearanceCurrency, Long otherFeeCurrency, Long otherSubCurrency, Long receivableCurrency) {
             this.receivableTotalSummary = new ArrayList<>();
             this.receivableTotalSettle = new ReceivableCurrencyAmount(receivableCurrency, BigDecimal.ZERO);
@@ -1286,6 +1330,9 @@ public class ReceivableServiceImpl extends AbstractService<ReceivableMapper, Rec
             this.receivableDestCountryClearance = new ReceivableCurrencyAmount(clearanceCurrency, BigDecimal.ZERO);
             this.receivableDestCountryOtherFee = new ReceivableCurrencyAmount(otherFeeCurrency, BigDecimal.ZERO);
             this.receivableDestCountryOtherFeeSub = new ReceivableCurrencyAmount(otherSubCurrency, BigDecimal.ZERO);
+
+            this.receivableBaseCurrency = new ReceivableCurrencyAmount(receivableCurrency, BigDecimal.ZERO);
+            this.receivableBaseCurrencySettle = new ReceivableCurrencyAmount(receivableCurrency, BigDecimal.ZERO);
         }
     }
 }
\ No newline at end of file
diff --git a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receiptItem/BankIncomeItemResp.java b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receiptItem/BankIncomeItemResp.java
index 468bc5c0abd9823b4d019b8eba0a678d90f9976f..c4a139b97d4a6f719c698ba8628f3f09a714cb6c 100644
--- a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receiptItem/BankIncomeItemResp.java
+++ b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receiptItem/BankIncomeItemResp.java
@@ -24,6 +24,9 @@ public class BankIncomeItemResp {
     @ApiModelProperty(value = "0收/1支,暂时没支")
     private Integer isIncome;
 
+    @ApiModelProperty(value = "收款账号id")
+    private Long accountId;
+
     @ApiModelProperty(value = "收款账号")
     private String accountNo;
 
diff --git a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/ReceivableBoxReportQueryVO.java b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/ReceivableBoxReportQueryVO.java
index 6d4fe59f9200cac049326374820fa06058b894fa..ad2e20dadf049440b19654fc1e07fc34ffca94d6 100644
--- a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/ReceivableBoxReportQueryVO.java
+++ b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/ReceivableBoxReportQueryVO.java
@@ -42,7 +42,7 @@ public class ReceivableBoxReportQueryVO {
     private Integer slStatus;
 
     @ApiModelProperty(value = "出货状态")
-    private Integer boxStatus;
+    private List<Integer> boxStatus;
 
     @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
     @ApiModelProperty(value = "开始到港时间")
@@ -83,6 +83,8 @@ public class ReceivableBoxReportQueryVO {
 
     private Boolean forceUpdateCache = false;
 
+    private List<String> selfNoList;
+
     public Boolean isEmpty() {
         return StringUtils.isBlank(selfNo)
                 && (CollectionUtil.isEmpty(startWarehouseIdList))
diff --git a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/ReceivableCurrencyAmount.java b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/ReceivableCurrencyAmount.java
index 136d48a8434b38cab08f6840a7f09f4ccb9897bc..64ef8704ded7688534f899a76919b4b5dabd5e37 100644
--- a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/ReceivableCurrencyAmount.java
+++ b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/ReceivableCurrencyAmount.java
@@ -15,7 +15,7 @@ public class ReceivableCurrencyAmount {
 
     public ReceivableCurrencyAmount(Long currencyId, BigDecimal amount) {
         this.currencyId = currencyId;
-        this.amount = amount;
+        this.amount = amount.setScale(2, BigDecimal.ROUND_HALF_UP);
     }
 
     @Override
@@ -32,6 +32,11 @@ public class ReceivableCurrencyAmount {
     }
 
     public void addAmount(BigDecimal amount) {
-        this.amount = this.amount.add(amount);
+        this.amount = this.amount.add(amount).setScale(2, BigDecimal.ROUND_HALF_UP);
+    }
+
+    @Override
+    public ReceivableCurrencyAmount clone() {
+        return new ReceivableCurrencyAmount(this.currencyId, this.amount);
     }
 }
\ No newline at end of file
diff --git a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/ReceivableIncomeBelong.java b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/ReceivableIncomeBelong.java
index d277113bb3aa3b06f9faaaa65aefe68905780855..d5c9bf190ec73374eec90f2f611c9df857d1558e 100644
--- a/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/ReceivableIncomeBelong.java
+++ b/yudao-module-wealth/yudao-module-wealth-core/src/main/java/cn/iocoder/yudao/module/wealth/vo/receivable/ReceivableIncomeBelong.java
@@ -12,4 +12,5 @@ public class ReceivableIncomeBelong {
      */
     private Integer incomeBelong;
     private BigDecimal writeOffAmount;
+    private BigDecimal writeOffBaseAmount;
 }
diff --git a/yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/job/BoxReportCacheRefreshJob.java b/yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/job/BoxReportCacheRefreshJob.java
new file mode 100644
index 0000000000000000000000000000000000000000..4475b1a052964ba11fee2d2ce8f0ecba41252726
--- /dev/null
+++ b/yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/job/BoxReportCacheRefreshJob.java
@@ -0,0 +1,31 @@
+package cn.iocoder.yudao.module.wealth.controller.admin.job;
+
+import cn.iocoder.yudao.framework.quartz.core.handler.JobHandler;
+import cn.iocoder.yudao.module.wealth.dal.mysql.receivable.ReceivableMapper;
+import cn.iocoder.yudao.module.wealth.service.receivable.ReceivableService;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+@Component
+@Slf4j
+@AllArgsConstructor
+public class BoxReportCacheRefreshJob implements JobHandler {
+    private final ReceivableService receivableService;
+    private final ReceivableMapper receivableMapper;
+
+    @Override
+    public String execute(String param) {
+        log.info("初始化应收报表缓存");
+        try {
+            List<Long> boxIds = receivableMapper.getAllBoxId();
+            receivableService.updateBoxAmountCache(boxIds, true);
+        } catch (Exception e) {
+            log.error("初始化应收报表缓存失败", e);
+        }
+        log.info("初始化应收报表缓存完成");
+        return "";
+    }
+}
diff --git a/yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/job/BoxReportCacheLoader.java b/yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/job/BoxReportCacheRefreshRunner.java
similarity index 96%
rename from yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/job/BoxReportCacheLoader.java
rename to yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/job/BoxReportCacheRefreshRunner.java
index 7dc61dbaddc4687bec8ad3e0be81ebd44aa9d8ca..55fa924e4339bf0c5e9d1a65bbfd39811ee32d21 100644
--- a/yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/job/BoxReportCacheLoader.java
+++ b/yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/job/BoxReportCacheRefreshRunner.java
@@ -19,10 +19,11 @@ import static cn.iocoder.yudao.module.wealth.enums.BoxReportConstant.BOX_AMOUNT_
 @Component
 @Slf4j
 @AllArgsConstructor
-public class BoxReportCacheLoader implements ApplicationRunner {
+public class BoxReportCacheRefreshRunner implements ApplicationRunner {
     private final ReceivableService receivableService;
     private final ReceivableMapper receivableMapper;
     private final RedisHelper redisHelper;
+
     @Override
     public void run(ApplicationArguments args) throws Exception {
         log.info("初始化应收报表缓存");
diff --git a/yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/receiptItem/ReceiptItemController.java b/yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/receiptItem/ReceiptItemController.java
index 1f473cca8d954822b3aa23e95c5e5f10b0107e9f..6fabf67941880d854181485b42d5f5929f44bab6 100644
--- a/yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/receiptItem/ReceiptItemController.java
+++ b/yudao-module-wealth/yudao-module-wealth-rest/src/main/java/cn/iocoder/yudao/module/wealth/controller/admin/receiptItem/ReceiptItemController.java
@@ -74,7 +74,7 @@ public class ReceiptItemController {
     @ApiOperation("创建收款明细")
     //@PreAuthorize("@ss.hasPermission('ecw:receipt-item:create')")
     public CommonResult<Long> createReceiptItem(@Valid @RequestBody ReceiptItemCreateReqVO createReqVO) {
-        return success(receiptItemService.createReceiptItem(createReqVO));
+        return success(receiptItemService.createReceiptItem(createReqVO,false));
     }
 
     @PutMapping("/update")
@@ -178,7 +178,8 @@ public class ReceiptItemController {
 
         LambdaQueryWrapper<ReceiptItemDO> lambdaQueryWrapper =
                 new LambdaQueryWrapper<>();
-        lambdaQueryWrapper.eq(ReceiptItemDO::getReceiptId, id);
+        lambdaQueryWrapper.eq(ReceiptItemDO::getReceiptId, id)
+                .in(ReceiptItemDO::getStatus, Arrays.asList(1, 2 ,3));
         List<ReceiptItemDO> listItem =
                 receiptItemMapper.selectList(lambdaQueryWrapper);
 
diff --git a/yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/ReceiptItem/BankReceiptDetailsMapper.xml b/yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/ReceiptItem/BankReceiptDetailsMapper.xml
index 57bb82aa329504f0b624ccf945eb344b3d4d0b28..95fcd126d4619cd8049d59568ac4b7a4adc5d1c0 100644
--- a/yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/ReceiptItem/BankReceiptDetailsMapper.xml
+++ b/yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/ReceiptItem/BankReceiptDetailsMapper.xml
@@ -89,6 +89,7 @@
         SELECT
         eri.id,
         eri.receipt_id,
+        eri.account_id,
         eri.account_no,
         eri.account_name,
         eri.account_bank_name,
@@ -102,8 +103,7 @@
         INNER JOIN (SELECT receipt_id, order_id FROM ecw_receivable GROUP BY receipt_id, order_id) rb
         ON rb.receipt_id = er.id
         LEFT JOIN ecw_order eo ON eo.order_id = rb.order_id
-        LEFT JOIN ecw_bank_account eba ON eba.ba_account_num = eri.account_no
-        WHERE eri.status = 1
+        WHERE eri.status = 1 AND  eri.account_id IS NOT NULL
         <include refid="incomePageCondition"/>
         GROUP BY eri.id
 <!--        <if test="req.isAsc != null">-->
@@ -121,7 +121,7 @@
             concat('%',#{req.relationNo},'%') OR eo.tidan_no = #{req.relationNo})
         </if>
         <if test="req.platformAccountIds != null and req.platformAccountIds.size > 0">
-            AND era.platform_account_id IN
+            AND eri.account_id IN
             <foreach collection="req.platformAccountIds" item="platformAccountId" open="(" separator="," close=")">
                 #{platformAccountId}
             </foreach>
@@ -148,7 +148,7 @@
             SUM(amount) AS amount
         FROM ecw_receipt_item
         WHERE
-            account_no = #{accountNo} AND status = 1
+            account_id = #{accountId} AND status = 1
         GROUP BY currency_id
     </select>
     <select id="calculateCurrentAmount"
@@ -164,8 +164,7 @@
         INNER JOIN (SELECT receipt_id, order_id FROM ecw_receivable GROUP BY receipt_id, order_id) rb
         ON rb.receipt_id = er.id
         LEFT JOIN ecw_order eo ON eo.order_id = rb.order_id
-        LEFT JOIN ecw_receipt_account era ON era.receipt_id = eri.receipt_id
-        WHERE eri.status = 1
+        WHERE eri.status = 1 AND eri.account_id IS NOT NULL
         <include refid="incomePageCondition"/>
         GROUP BY eri.id) AS t
         GROUP BY t.currency_id
diff --git a/yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/ReceiptItem/ReceiptItemMapper.xml b/yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/ReceiptItem/ReceiptItemMapper.xml
index e62002a8c5d046cb25ee5cdb4e8a59a6943e78d4..6a2322e62107291ef368a3514f0234530ae869bc 100644
--- a/yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/ReceiptItem/ReceiptItemMapper.xml
+++ b/yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/ReceiptItem/ReceiptItemMapper.xml
@@ -108,7 +108,8 @@
         SELECT
         erwor.receivable_id,
         erwor.income_belong,
-        SUM(erwor.receivable_write_off_amount) AS write_off_amount
+        IFNULL(SUM(erwor.receivable_write_off_amount), 0) AS write_off_amount,
+        IFNULL(SUM(erwor.write_off_amount), 0) AS write_off_base_amount
         FROM ecw_receivable_write_off_record erwor
         LEFT JOIN ecw_receipt_item eri ON erwor.receipt_item_id = eri.id
         WHERE
diff --git a/yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/receipt/ReceiptMapper.xml b/yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/receipt/ReceiptMapper.xml
index 5d4448581ffdd03e53b30b1d9cd9298a1fc3a99e..ab78706c12ce6d834d27cecaa1466b370df7afc9 100644
--- a/yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/receipt/ReceiptMapper.xml
+++ b/yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/receipt/ReceiptMapper.xml
@@ -55,16 +55,19 @@
     </select>
     <select id="countReceiptBackPage" resultType="java.lang.Integer">
         SELECT count(1)
+        FROM (
+        SELECT er.id
         FROM ecw_receipt er
         <if test="query.numberNo != null and query.numberNo != ''">
-            INNER JOIN (SELECT receipt_id,order_id FROM ecw_receivable GROUP BY receipt_id, order_id ) AS rb ON rb.receipt_id = er.id
+            INNER JOIN (SELECT receipt_id,order_id FROM ecw_receivable GROUP BY receipt_id, order_id ) AS rb ON
+            rb.receipt_id = er.id
             LEFT JOIN ecw_order o ON o.order_id=rb.order_id AND o.deleted=0
         </if>
         WHERE er.deleted = 0
         <include refid="pageCondition"/>
         <if test="query.numberNo != null and query.numberNo != ''">
             GROUP BY er.receipt_no
-        </if>
+        </if>) AS t
     </select>
     <select id="getReceiptItemPayat" resultType="java.util.Date">
         SELECT eri.amount_date
diff --git a/yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/receivable/ReceivableMapper.xml b/yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/receivable/ReceivableMapper.xml
index 385c1cebc0df8aae11b085cf705f06b330eca77a..a174b40332bc23899c09a435464cc183ce60f1ac 100644
--- a/yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/receivable/ReceivableMapper.xml
+++ b/yudao-module-wealth/yudao-module-wealth-rest/src/main/resources/mapper/receivable/ReceivableMapper.xml
@@ -453,18 +453,17 @@
         eb.id,
         eb.self_no,
         eb.dg_date,
-        eb.qg_date,
         eb.orderCount,
         eb.ladingCount,
         eb.dest_country_id,
         ebs.sl_settled_time,
-        ebcn.ul_warehouse_time
+        ebc.cl_clear_time qg_date,
+        ebcu.ul_warehouse_time
         FROM (
         SELECT
         box.id id,
         box.self_no self_no,
         box.dg_date dg_date,
-        box.qg_date qg_date,
         box.dest_country_id dest_country_id,
         box.start_warehouse_id start_warehouse_id,
         box.dest_warehouse_id dest_warehouse_id,
@@ -481,42 +480,55 @@
         <if test="query.beginDaogangTime != null and query.endDaogangTime != null">
             AND box.dg_date BETWEEN #{query.beginDaogangTime} AND #{query.endDaogangTime}
         </if>
-        <if test="query.beginQingguanTime != null and query.endQingguanTime != null">
-            AND box.qg_date BETWEEN #{query.beginQingguanTime} AND #{query.endQingguanTime}
-        </if>
         <if test="query.selfNo != null and query.selfNo != '' ">
             AND box.self_no LIKE concat('%',#{query.selfNo},'%')
         </if>
+        <if test="query.selfNoList != null and query.selfNoList.size() > 0">
+            AND box.self_no IN
+            <foreach collection="query.selfNoList" item="item" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
         <if test="query.startWarehouseIdList != null and query.startWarehouseIdList.size() > 0">
             AND box.start_warehouse_id IN
             <foreach collection="query.startWarehouseIdList" item="item" open="(" separator="," close=")">
                 #{item}
             </foreach>
         </if>
+        <if test="query.destCountryId != null and query.destCountryId.size() > 0">
+            AND box.dest_country_id IN
+            <foreach collection="query.destCountryId" item="item" open="(" separator="," close=")">
+                #{item}
+            </foreach>
+        </if>
         <if test="query.destWarehouseIdList != null and query.destWarehouseIdList.size() > 0">
             AND box.dest_warehouse_id IN
             <foreach collection="query.destWarehouseIdList" item="item" open="(" separator="," close=")">
                 #{item}
             </foreach>
         </if>
-        <if test="query.boxStatus != null">
-            AND box.shipment_status = #{query.boxStatus}
+        <if test="query.boxStatus != null and query.boxStatus.size() > 0">
+            AND box.shipment_status IN
+            <foreach collection="query.boxStatus" item="item" open="(" separator="," close=")">
+                #{item}
+            </foreach>
         </if>
         <if test="query.slStatus != null">
             AND box.sl_status = #{query.slStatus}
         </if>
         ) eb
-        LEFT JOIN ecw_box_cabinet_unload ebcn ON eb.id = ebcn.shipment_id
+        LEFT JOIN ecw_box_cabinet_unload ebcu ON eb.id = ebcu.shipment_id
         LEFT JOIN ecw_box_settlement ebs ON eb.id = ebs.shipment_id
-        <if test="query.beginUlWarehouseTime != null and query.endUlWarehouseTime != null">
-            LEFT JOIN ecw_box_clearance ebc ON eb.id = ebc.shipment_id
-        </if>
+        LEFT JOIN ecw_box_clearance ebc ON eb.id = ebc.shipment_id
         WHERE 1 = 1
         <if test="query.beginJsDate != null and query.endJsDate != null">
             AND ebs.sl_settled_time BETWEEN #{query.beginJsDate} AND #{query.endJsDate}
         </if>
+        <if test="query.beginQingguanTime != null and query.endQingguanTime != null">
+            AND ebc.cl_clear_time BETWEEN #{query.beginQingguanTime} AND #{query.endQingguanTime}
+        </if>
         <if test="query.beginUlWarehouseTime != null and query.endUlWarehouseTime != null">
-            AND ebc.cl_clear_time BETWEEN #{query.beginUlWarehouseTime} AND #{query.endUlWarehouseTime}
+            AND ebcu.ul_warehouse_time BETWEEN #{query.beginUlWarehouseTime} AND #{query.endUlWarehouseTime}
         </if>
         <if test="query.ladingBillStatus != null">
             <if test="query.ladingBillStatus == 0">
@@ -570,4 +582,11 @@
     <select id="getAllBoxId" resultType="java.lang.Long">
         SELECT id FROM ecw_box WHERE deleted = 0 AND pr_status &gt; 21 AND dest_country_id > 0
     </select>
+    <select id="getDestWarehouseIdListByDestCity" resultType="java.lang.Long">
+        SELECT id FROM ecw_warehouse WHERE deleted = 0
+        AND shi IN
+        <foreach collection="destCity" item="item" open="(" separator="," close=")">
+            #{item}
+        </foreach>
+    </select>
 </mapper>