@GET @Path("/getTrackCountList") public Response getTrackCount( final @HeaderParam("token") String token, final @HeaderParam("partnerId") String partnerId, final @QueryParam("vehicleId") String vehicleId, final @QueryParam("endTime") String endTime, final @QueryParam("startTime") String startTime, final @QueryParam("idleTime") Integer idleTime, final @QueryParam("parkTime") Integer parkTime) { GetTrackCountListResponse response = new GetTrackCountListResponse(); List<TrackSectionSum> trackCountList = sectionCountService.getTrackSectionSumsByVehicleIdReal( vehicleId, endTime, startTime, idleTime, parkTime); response.getData().setTrackCountList(trackCountList); return Response.status(Response.Status.OK).entity(response).build(); }
@GET @Path("/trackCountsPage") public Response trackCountsPage( final @HeaderParam("token") String token, final @HeaderParam("partnerId") String partnerId, final @QueryParam("vehicleId") String vehicleId, final @QueryParam("endDate") String endDate, final @QueryParam("startDate") String startDate, final @QueryParam("pageSize") Integer pageSize, final @QueryParam("currentPage") Integer currentPage) { GetTrackCountsPageResponse response = new GetTrackCountsPageResponse(); if (pageSize != null) response.getData().setPageSize(pageSize); if (currentPage != null) response.getData().setCurrentPage(currentPage); List<TrackSectionSum> trackCountList = sectionCountService.getTrackSectionSumsPageByVehicleId( vehicleId, endDate, startDate, response.getData()); response.getData().setTrackCountList(trackCountList); return Response.status(Response.Status.OK).entity(response).build(); }