diff --git a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/entity/KingdeeReceiptFlow.java b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/entity/KingdeeReceiptFlow.java index 40d5c393..3b5b94ff 100644 --- a/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/entity/KingdeeReceiptFlow.java +++ b/blade-service-api/blade-transport-api/src/main/java/org/springblade/transport/pojo/entity/KingdeeReceiptFlow.java @@ -113,7 +113,7 @@ public class KingdeeReceiptFlow extends TenantEntity { */ private LocalDateTime transactionTime; /** - * 明细流水号(A301-1 流水分录 bei_detailid,兜底 bei_bankdetailno,幂等键) + * 明细流水号(收款单号 billno,幂等键;C104-2 按此定位合规侧收款流水) */ private String detailSerialNo; /** diff --git a/blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/ReceiptFlowServiceImpl.java b/blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/ReceiptFlowServiceImpl.java index ab59ea54..7782c5bc 100644 --- a/blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/ReceiptFlowServiceImpl.java +++ b/blade-service/blade-transport/src/main/java/org/springblade/transport/service/impl/ReceiptFlowServiceImpl.java @@ -40,7 +40,6 @@ import org.springblade.system.cache.UserCache; import org.springblade.system.pojo.entity.Dept; import org.springblade.thirdparty.bfi.pojo.dto.BfiRecBillQueryDTO; import org.springblade.thirdparty.bfi.pojo.vo.BfiPageVO; -import org.springblade.thirdparty.bfi.pojo.vo.BfiRecBillFlowVO; import org.springblade.thirdparty.bfi.pojo.vo.BfiRecBillVO; import org.springblade.thirdparty.bfi.service.IBfiService; import org.springblade.thirdparty.bfi.util.BfiUtil; @@ -483,7 +482,24 @@ public class ReceiptFlowServiceImpl extends BaseServiceImpl= SYNC_BATCH_SIZE) { batchNo++; totalCount += syncBatch(batchNo, pending); @@ -515,44 +531,6 @@ public class ReceiptFlowServiceImpl extends BaseServiceImpl bei_bankdetailno > 收款单号 billno 兜底 - * (无流水分录的单如手工收款单也入库,但认领后 C104-2 将定位不到合规流水,C107-1 落失败标记)。 - * - * @return 跳过条数 - */ - private int expandRecBillRows(BfiRecBillVO recBill, List pending, Set batchSerials) { - int skipped = 0; - List flowEntries = recBill.getInfoentry(); - if (Func.isEmpty(flowEntries)) { - flowEntries = List.of(new BfiRecBillFlowVO()); - } - for (BfiRecBillFlowVO flowEntry : flowEntries) { - // 明细流水号优先级:bei_detailid > bei_bankdetailno > 收款单号兜底 - String detailSerialNo = firstNonBlank(flowEntry.getBeiDetailid(), flowEntry.getBeiBankdetailno(), - recBill.getBillno()); - if (Func.isEmpty(detailSerialNo)) { - log.warn("收款流水同步跳过:收款单[{}]缺少明细流水号", recBill.getBillno()); - skipped++; - continue; - } - detailSerialNo = detailSerialNo.trim(); - if (!batchSerials.add(detailSerialNo)) { - throw new ServiceException("明细流水号" + detailSerialNo + "重复"); - } - // 收款金额取主单入账金额 inneraccountamount(金蝶口径,非流水分录 bei_creditamount) - BigDecimal receiptAmount = money(recBill.getInneraccountAmount()); - if (receiptAmount.compareTo(BigDecimal.ZERO) <= 0) { - log.warn("收款流水同步跳过:收款单[{}]收款金额(inneraccountamount)为空或小于0", recBill.getBillno()); - skipped++; - continue; - } - pending.add(new BfiRecBillRow(recBill, detailSerialNo, receiptAmount)); - } - return skipped; - } - /** * 单批入库(独立事务):批内 FOR UPDATE 防并发,按明细流水号 upsert,操作日志批量落库 * @@ -877,15 +855,6 @@ public class ReceiptFlowServiceImpl extends BaseServiceImpl