定点、到站回收订单业务功能bug问题修复v5

door
LI-CCONG\李聪聪 7 months ago
parent 4af14b6030
commit 127811e086

@ -49,6 +49,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.security.cert.X509Certificate;
import java.time.LocalDateTime;
import java.util.Collections;
@ -261,7 +262,7 @@ public class ClientServiceImpl extends ServiceImpl<ClientMapper, Client> impleme
BigDecimal balance = client.getBanlance();
String remark;
LocalDateTime now = LocalDateTime.now();
String amountStr = String.valueOf(amount.setScale(2));
String amountStr = String.valueOf(amount.setScale(2, RoundingMode.HALF_UP));
if (changeTypeEnum.equals(BalanceChangeTypeEnum.INCOME)) { // 收入
balance = balance.add(amount);
remark = "废品回收结算,收入" + amountStr + "元";

@ -21,6 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.time.LocalDateTime;
/**
@ -88,7 +89,7 @@ public class EnterpriseServiceImpl extends ServiceImpl<EnterpriseMapper, Enterpr
accountBill.setIncomeAmount(rechargeAmount);
accountBill.setOrderNumber("0");
accountBill.setRemark("充值金额" + rechargeAmount.setScale(2) + "元");
accountBill.setRemark("充值金额" + rechargeAmount.setScale(2, RoundingMode.HALF_UP) + "元");
accountBill.setCreatorTime(now);
accountBillMapper.insert(accountBill);
}

Loading…
Cancel
Save