remove compilation warnings furing gradle build
This commit is contained in:
+15
-9
@@ -5,6 +5,15 @@
|
|||||||
*/
|
*/
|
||||||
package org.mifosplatform.organisation.teller.api;
|
package org.mifosplatform.organisation.teller.api;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import javax.ws.rs.Consumes;
|
||||||
|
import javax.ws.rs.GET;
|
||||||
|
import javax.ws.rs.Path;
|
||||||
|
import javax.ws.rs.Produces;
|
||||||
|
import javax.ws.rs.QueryParam;
|
||||||
|
import javax.ws.rs.core.MediaType;
|
||||||
|
|
||||||
import org.mifosplatform.infrastructure.core.serialization.DefaultToApiJsonSerializer;
|
import org.mifosplatform.infrastructure.core.serialization.DefaultToApiJsonSerializer;
|
||||||
import org.mifosplatform.infrastructure.security.service.PlatformSecurityContext;
|
import org.mifosplatform.infrastructure.security.service.PlatformSecurityContext;
|
||||||
import org.mifosplatform.organisation.teller.data.TellerData;
|
import org.mifosplatform.organisation.teller.data.TellerData;
|
||||||
@@ -15,10 +24,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.context.annotation.Scope;
|
import org.springframework.context.annotation.Scope;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.ws.rs.*;
|
|
||||||
import javax.ws.rs.core.MediaType;
|
|
||||||
import java.util.Collection;
|
|
||||||
|
|
||||||
@Path("cashiersjournal")
|
@Path("cashiersjournal")
|
||||||
@Component
|
@Component
|
||||||
@Scope("singleton")
|
@Scope("singleton")
|
||||||
@@ -29,8 +34,8 @@ public class TellerJournalApiResource {
|
|||||||
private final TellerManagementReadPlatformService readPlatformService;
|
private final TellerManagementReadPlatformService readPlatformService;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public TellerJournalApiResource(final PlatformSecurityContext securityContext, final DefaultToApiJsonSerializer jsonSerializer,
|
public TellerJournalApiResource(final PlatformSecurityContext securityContext,
|
||||||
final TellerManagementReadPlatformService readPlatformService) {
|
final DefaultToApiJsonSerializer<TellerData> jsonSerializer, final TellerManagementReadPlatformService readPlatformService) {
|
||||||
super();
|
super();
|
||||||
this.securityContext = securityContext;
|
this.securityContext = securityContext;
|
||||||
this.jsonSerializer = jsonSerializer;
|
this.jsonSerializer = jsonSerializer;
|
||||||
@@ -38,13 +43,14 @@ public class TellerJournalApiResource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@GET
|
@GET
|
||||||
@Consumes({MediaType.TEXT_HTML, MediaType.APPLICATION_JSON})
|
@Consumes({ MediaType.TEXT_HTML, MediaType.APPLICATION_JSON })
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public String getJournalData(@QueryParam("officeId") final Long officeId, @QueryParam("tellerId") final Long tellerId,
|
public String getJournalData(@QueryParam("officeId") final Long officeId, @QueryParam("tellerId") final Long tellerId,
|
||||||
@QueryParam("cashierId") final Long cashierId, @QueryParam("dateRange") final String dateRange) {
|
@QueryParam("cashierId") final Long cashierId, @QueryParam("dateRange") final String dateRange) {
|
||||||
final DateRange dateRangeHolder = DateRange.fromString(dateRange);
|
final DateRange dateRangeHolder = DateRange.fromString(dateRange);
|
||||||
|
|
||||||
final Collection<TellerJournalData> journals = this.readPlatformService.getJournals(officeId, tellerId, cashierId, dateRangeHolder.getStartDate(), dateRangeHolder.getEndDate());
|
final Collection<TellerJournalData> journals = this.readPlatformService.getJournals(officeId, tellerId, cashierId,
|
||||||
|
dateRangeHolder.getStartDate(), dateRangeHolder.getEndDate());
|
||||||
|
|
||||||
return this.jsonSerializer.serialize(journals);
|
return this.jsonSerializer.serialize(journals);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user