Rev 35034 | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.service.order;import com.spice.profitmandi.common.enumuration.SearchType;import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;import com.spice.profitmandi.common.model.*;import com.spice.profitmandi.dao.entity.fofo.CustomerAddress;import com.spice.profitmandi.dao.entity.fofo.CustomerCreditNote;import com.spice.profitmandi.dao.entity.fofo.FofoOrder;import com.spice.profitmandi.dao.entity.fofo.FofoOrderItem;import com.spice.profitmandi.dao.enumuration.inventory.ScratchedGift;import org.springframework.http.ResponseEntity;import org.springframework.stereotype.Service;import java.time.LocalDate;import java.time.LocalDateTime;import java.util.List;import java.util.Map;@Servicepublic interface OrderService {int createOrder(CreateOrderRequest createOrderRequest, int fofoId, boolean accessoriesDeals)throws Exception;void updateCustomerDetails(CustomCustomer customCustomer, String invoiceNumber)throws ProfitMandiBusinessException;InvoicePdfModel getInvoicePdfModel(FofoOrder fofoOrder) throws ProfitMandiBusinessException;InvoicePdfModel getInvoicePdfModel(int fofoId, int orderId) throws ProfitMandiBusinessException;InvoicePdfModel getInvoicePdfModel(int orderId) throws ProfitMandiBusinessException;String getBillingAddress(CustomerAddress customerAddress);List<CartFofo> cartCheckout(String cartJson) throws ProfitMandiBusinessException;List<FofoOrderItem> getByOrderId(int orderId) throws ProfitMandiBusinessException;Map<String, Object> getSaleHistory(int fofoId, SearchType searchType, String searchValue,LocalDateTime startDate, LocalDateTime endDate, int offset, int limit) throws ProfitMandiBusinessException;public Map<String, Object> getSaleHistoryPaginated(int fofoId, SearchType searchType, String searchValue,LocalDateTime startDate, LocalDateTime endDate, int offset, int limit) throws ProfitMandiBusinessException;public CustomerCreditNote badReturn(int fofoId, FoiBadReturnRequest foiBadReturnRequest)throws ProfitMandiBusinessException;public CustomerCreditNote badReturn(String loginMail,int fofoId, FoiBadReturnRequest foiBadReturnRequest)throws ProfitMandiBusinessException;public CreditNotePdfModel getCreditNotePdfModel(int customerCreditNoteId) throws ProfitMandiBusinessException;public void cancelOrder(List<String> invoiceNumbers) throws ProfitMandiBusinessException;void reverseActivationScheme(List<Integer> inventoryItemIds) throws ProfitMandiBusinessException;public float getSales(int fofoId, LocalDateTime startDate, LocalDateTime endDate);public float getSales(int fofoId, LocalDate onDate);public float getSales(LocalDateTime onDate);public float getSales(LocalDateTime startDate, LocalDateTime endDate);void processScratchOffer(FofoOrder fofoOrder) throws ProfitMandiBusinessException;ScratchedGift getSelectedGift(double purchaseAmount,int fofoId) throws ProfitMandiBusinessException;String getInvoiceNumber(int fofoId, String fofoStoreCode);public ResponseEntity<?> downloadReportInCsv( org.apache.commons.io.output.ByteArrayOutputStream baos , List<List<?>> rows,String fileName);public boolean applyColorChange(int orderId, int itemId) throws ProfitMandiBusinessException;public FofoOrder getOrderByInventoryItemId(int inventoryItemId) throws Exception;LocalDateTime getMaxSalesDate(int fofoId, LocalDateTime startDate, LocalDateTime endDate);InvoicePdfModel getDummyPdfModel(String serialNumber) throws ProfitMandiBusinessException;//should no longer to be usedpublic Map<Integer, Long> carryBagCreditCount(int fofoId) throws ProfitMandiBusinessException;void reverseScheme(FofoOrder fofoOrder) throws ProfitMandiBusinessException;void createMissingScratchOffers();boolean refundOrder(int orderId, String refundedBy, String refundReason) throws ProfitMandiBusinessException;}