|
|
@ -45,8 +45,8 @@ public class TripRequirementServiceImpl extends RequirementBaseServiceImpl<TripR
|
|
|
|
super.update(entity);
|
|
|
|
super.update(entity);
|
|
|
|
|
|
|
|
|
|
|
|
if (entity.getState() == RequirementState.APPROVED) {
|
|
|
|
if (entity.getState() == RequirementState.APPROVED) {
|
|
|
|
TripBill newBill = tripBillService.createTripBill(entity);
|
|
|
|
|
|
|
|
for (TripBill bill : getBills(entity)) {
|
|
|
|
for (TripBill bill : getBills(entity)) {
|
|
|
|
|
|
|
|
TripBill newBill = tripBillService.createTripBill(entity);
|
|
|
|
bill.getBillItems().clear();
|
|
|
|
bill.getBillItems().clear();
|
|
|
|
bill.getBillItems().addAll(newBill.getBillItems());
|
|
|
|
bill.getBillItems().addAll(newBill.getBillItems());
|
|
|
|
tripBillService.calculate(bill);
|
|
|
|
tripBillService.calculate(bill);
|
|
|
|