package Ġcom . virtual pair program mers . the ater . services Ċ Ċ import Ġcom . virtual pair program mers . the ater . data . Booking Repository Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġorg . springframework . stereotype . Service Ċ import Ġjava . math . BigDecimal Ċ Ċ @ Service Ċ class ĠReporting Service Ġ{ ĊĊĠĠĠ Ġ@ Autowired ĊĠĠĠ Ġlateinit Ġvar Ġbooking Repository : ĠBook ing Repository ĊĊĠĠĠ Ġfun Ġall _ bookings () Ġ: ĠString Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbook ings Ġ= Ġbooking Repository . findAll () ĊĠĠĠĠĠĠĠ Ġval Ġhtml Book ings Ġ= Ġbook ings . map Ġ{" < tr >< td >${ it . performance . title }</ td >< td >${ it . seat }</ td >< td >${ it . customer Name }</ td ></ tr > "} ĊĠĠĠĠĠĠĠ Ġval Ġreport Header Ġ= Ġ"< table >< tr >< th > Performance </ th >< th > Seat </ th >< th > Customer </ th ></ tr >" ĊĠĠĠĠĠĠĠ Ġval Ġreport Footer Ġ= Ġ"</ table >" ĊĠĠĠĠĠĠĠ Ġreturn Ġ"${ report Header }${ html Book ings . join ToString ()} ${ report Footer }" ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġprem ium _ bookings () Ġ: ĠString Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġbook ings Ġ= Ġbooking Repository . findAll () ĊĠĠĠĠĠĠĠ Ġval Ġhtml Book ings Ġ= Ġbook ings ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. filter Ġ{ it . seat . price Ġ> ĠBigDecimal ( 1 5 ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{" < tr >< td >${ it . performance . title }</ td >< td >${ it . seat }</ td >< td >${ it . customer Name }</ td ></ tr > "} ĊĠĠĠĠĠĠĠ Ġval Ġreport Header Ġ= Ġ"< table >< tr >< th > Performance </ th >< th > Seat </ th >< th > Customer </ th ></ tr >" ĊĠĠĠĠĠĠĠ Ġval Ġreport Footer Ġ= Ġ"</ table >" ĊĠĠĠĠĠĠĠ Ġreturn Ġ"${ report Header }${ html Book ings . join ToString ()} ${ report Footer }" ĊĠĠĠ Ġ} Ċ Ċ }