gaoluyang
2026-10-29 5276c9fe5c3e5c2a5bca3ed1510ecdd0e728f516
src/main/java/com/ruoyi/purchase/service/impl/PurchaseLedgerServiceImpl.java
@@ -1099,7 +1099,11 @@
                    if (snapshot.getProjectName() == null) {
                        snapshot.setProjectName(purchaseLedger.getProjectName());
                    }
                    if (snapshot.getEntryDate() == null) {
                    // 录入时间以采购台账为准,避免审批快照里的录入日期与台账对不上
                    if (purchaseLedger.getEntryDate() != null
                            && (snapshot.getEntryDate() == null
                            || !DateUtils.toLocalDate(snapshot.getEntryDate())
                            .equals(DateUtils.toLocalDate(purchaseLedger.getEntryDate())))) {
                        snapshot.setEntryDate(purchaseLedger.getEntryDate());
                    }
                    if (snapshot.getExecutionDate() == null) {
@@ -1108,6 +1112,13 @@
                    if (snapshot.getRemarks() == null) {
                        snapshot.setRemarks(purchaseLedger.getRemarks());
                    }
                    // 提交审批时若尚未填写合同金额,快照里会是0,这里用台账里的当前金额兜底
                    if (snapshot.getContractAmount() == null || snapshot.getContractAmount().compareTo(BigDecimal.ZERO) == 0) {
                        snapshot.setContractAmount(purchaseLedger.getContractAmount());
                    }
                    if (snapshot.getNetContractAmount() == null || snapshot.getNetContractAmount().compareTo(BigDecimal.ZERO) == 0) {
                        snapshot.setNetContractAmount(purchaseLedger.getNetContractAmount());
                    }
                    if (snapshot.getRecorderId() == null) {
                        snapshot.setRecorderId(purchaseLedger.getRecorderId());
                    }