diff --git a/src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java b/src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java index 481417d..c5dd7e0 100644 --- a/src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java +++ b/src/main/java/com/example/demo/serviceImpl/cash/CashCollectionServiceImpl.java @@ -793,11 +793,13 @@ public class CashCollectionServiceImpl implements CashCollectionService { if (adjustedValue > 0) { // Positive value: row to column (转出方 to 转入方) double amountInYuan = adjustedValue / 100.0; - remark = fromName + "→" + toName + "调整金额:" + amountInYuan; + String amountStr = amountInYuan == (long) amountInYuan ? String.valueOf((long) amountInYuan) : String.valueOf(amountInYuan); + remark = fromName + "→" + toName + "调整金额:" + amountStr; } else { // Negative value: column to row (转入方 to 转出方) double amountInYuan = (-adjustedValue) / 100.0; - remark = toName + "→" + fromName + "调整金额:" + amountInYuan; + String amountStr = amountInYuan == (long) amountInYuan ? String.valueOf((long) amountInYuan) : String.valueOf(amountInYuan); + remark = toName + "→" + fromName + "调整金额:" + amountStr; } // Create CashRecord objects and call mapper adjust method twice