Добрый день!
У меня есть отчет, который должен получать данные используя сервис.
В сервисе есть следующий метод:
List<Map<String,String>> getDataFromTransStations(List<TransStation> transStations, String filter);
В самом отчете я пытаюсь передать в него параметры:
String filter = ""
List<Map<String, String>> resultFromService = new ArrayList<>()
resultFromService = reportService.getDataFromTransStations(params['transStations'], filter)
Параметр ‘transStations’:
При попытке выполнения отчета выдает следующую ошибку:
com.haulmont.reports.exception.ReportingException: An error occurred while loading data for band [header] and query [data]. Report name [Монтажная ведомость по форме заказчика (новая)]
An error occurred while loading data for data set [data]
No signature of method: com.sun.proxy.$Proxy384.getDataFromTransStations() is applicable for argument types: (com.haulmont.bali.collections.ReadOnlyLinkedMapValuesView, String) values: [[com.company.enerstroymain.entity.TransStation-3c509fc7-e378-25e8-1aca-1bbf6f112ad3 [detached], ...], ...]
Possible solutions: getDataFromTransStations(java.util.List, java.lang.String)
at com.haulmont.reports.ReportingBean.createReportDocument(ReportingBean.java:372)
at com.haulmont.reports.ReportingBean.createReportDocument(ReportingBean.java:315)
at com.haulmont.reports.ReportingBean.createReport(ReportingBean.java:223)
at com.haulmont.reports.ReportServiceBean.createReport(ReportServiceBean.java:56)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)
at com.haulmont.cuba.core.sys.ServiceInterceptor.aroundInvoke(ServiceInterceptor.java:116)
at jdk.internal.reflect.GeneratedMethodAccessor155.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
at com.sun.proxy.$Proxy345.createReport(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.haulmont.cuba.core.sys.remoting.LocalServiceInvokerImpl.invoke(LocalServiceInvokerImpl.java:94)
at com.haulmont.cuba.web.sys.remoting.LocalServiceProxy$LocalServiceInvocationHandler.invoke(LocalServiceProxy.java:154)
at com.sun.proxy.$Proxy75.createReport(Unknown Source)
at com.haulmont.reports.gui.ReportGuiManager.getReportResult(ReportGuiManager.java:287)
at com.haulmont.reports.gui.ReportGuiManager$1.run(ReportGuiManager.java:418)
at com.haulmont.reports.gui.ReportGuiManager$1.run(ReportGuiManager.java:413)
at com.haulmont.cuba.gui.backgroundwork.LocalizedTaskWrapper.run(LocalizedTaskWrapper.java:57)
at com.haulmont.cuba.web.gui.executors.impl.WebBackgroundWorker$WebTaskExecutor.call(WebBackgroundWorker.java:205)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at com.haulmont.cuba.web.gui.executors.impl.WebBackgroundWorker$WebTaskExecutor.lambda$startExecution$1(WebBackgroundWorker.java:376)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Как правильно передать список сущностей определенного класса из параметра отчета в сервис?