1
This commit is contained in:
@@ -1175,12 +1175,12 @@ private String handleTF(String input) {
|
|||||||
return warn;
|
return warn;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 验证2:如果京粉实际价格不为空,检查与付款金额是否一致
|
// 验证2:如果京粉实际价格不为空,检查与付款金额的差值是否大于等于100
|
||||||
if (order.getJingfenActualPrice() != null && order.getPaymentAmount() != null) {
|
if (order.getJingfenActualPrice() != null && order.getPaymentAmount() != null) {
|
||||||
double diff = Math.abs(order.getPaymentAmount() - order.getJingfenActualPrice());
|
double diff = Math.abs(order.getPaymentAmount() - order.getJingfenActualPrice());
|
||||||
// 如果金额不一致(允许0.01的浮点数误差),则提示警告
|
// 如果差额大于等于100,则提示警告
|
||||||
if (diff > 0.01) {
|
if (diff >= 100.0) {
|
||||||
String warn = "[炸弹] [炸弹] [炸弹] 录单警告!!! \n付款金额和实际金额不一致,请联系管理员录单\n" +
|
String warn = "[炸弹] [炸弹] [炸弹] 录单警告!!! \n付款金额和实际金额相差" + String.format("%.2f", diff) + ",请联系管理员录单\n" +
|
||||||
"付款金额:" + order.getPaymentAmount() + "\n" +
|
"付款金额:" + order.getPaymentAmount() + "\n" +
|
||||||
"京粉实际价格:" + order.getJingfenActualPrice() + "\n" +
|
"京粉实际价格:" + order.getJingfenActualPrice() + "\n" +
|
||||||
"差额:" + String.format("%.2f", diff);
|
"差额:" + String.format("%.2f", diff);
|
||||||
|
|||||||
Reference in New Issue
Block a user