This commit is contained in:
齐天大圣 2024-03-13 16:43:28 +08:00
parent a57a04dc87
commit 785bb0b3b8

View File

@ -593,10 +593,9 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
}
} else {
JSONObject jsonObject1 = new JSONObject();
jsonObject1.put("type", cardFuleOrders.getType());
jsonObject1.put("type", cardFuleOrders.getType()+"-"+cardFuleOrders.getOilName());
jsonObject1.put("oilType", cardFuleOrders.getOilType());
jsonObject1.put("refuelMoney", cardFuleOrders.getIncomeLitres());
jsonObject1.put("oilName", cardFuleOrders.getOilName());
jsonObjectList.add(jsonObject1);
String userBnlancce = jsonObjectList.toString();
userBalance.setRefuelMoney(userBnlancce);
@ -604,10 +603,9 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
} else {
ArrayList<JSONObject> jsonObjects = new ArrayList<>();
JSONObject jsonObject = new JSONObject();
jsonObject.put("type", cardFuleOrders.getType());
jsonObject.put("type", cardFuleOrders.getType()+"-"+cardFuleOrders.getOilName());
jsonObject.put("oilType", cardFuleOrders.getOilType());
jsonObject.put("refuelMoney", cardFuleOrders.getIncomeLitres());
jsonObject.put("oilName", cardFuleOrders.getOilName());
jsonObjects.add(jsonObject);
userBalance.setRefuelMoney(jsonObjects.toString());
}
@ -616,10 +614,9 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
}else {
ArrayList<JSONObject> jsonObjects = new ArrayList<>();
JSONObject jsonObject = new JSONObject();
jsonObject.put("type",cardFuleOrders.getType());
jsonObject.put("type", cardFuleOrders.getType()+"-"+cardFuleOrders.getOilName());
jsonObject.put("oilType",cardFuleOrders.getOilType());
jsonObject.put("refuelMoney",cardFuleOrders.getIncomeLitres());
jsonObject.put("oilName",cardFuleOrders.getOilName());
jsonObjects.add(jsonObject);
userBalance1.setRefuelMoney(jsonObjects.toString());
userBalance1.setMtUserId(cardFuleOrders.getMtUserId());
@ -687,7 +684,7 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
Integer refuelMoney1 = jsonObject.getInteger("refuelMoney");
if (ObjectUtils.isNotEmpty(oilType)) {
LambdaQueryWrapper<CardFuelRecord> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(CardFuelRecord::getStoreId, userBalance.getStoreId())
queryWrapper.eq(CardFuelRecord::getChainStoreId, userBalance.getChainStoreId())
.eq(CardFuelRecord::getMtUserId, userBalance.getMtUserId())
.eq(CardFuelRecord::getOilType, oilType)
.orderByAsc(CardFuelRecord::getCreateTime);
@ -717,7 +714,6 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
userBalance.setCardBalance(cardBalance + restMoney);
}
}
}
}
}