Subversion Repositories SmartDukaan

Rev

Rev 32724 | Rev 32961 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
23365 ashik.ali 1
package com.spice.profitmandi.service.order;
22859 ashik.ali 2
 
23202 ashik.ali 3
import com.spice.profitmandi.common.enumuration.SearchType;
22859 ashik.ali 4
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
30321 amit.gupta 5
import com.spice.profitmandi.common.model.*;
22859 ashik.ali 6
import com.spice.profitmandi.dao.entity.fofo.CustomerAddress;
23654 amit.gupta 7
import com.spice.profitmandi.dao.entity.fofo.CustomerCreditNote;
25083 amit.gupta 8
import com.spice.profitmandi.dao.entity.fofo.FofoOrder;
22925 ashik.ali 9
import com.spice.profitmandi.dao.entity.fofo.FofoOrderItem;
32960 amit.gupta 10
import com.spice.profitmandi.dao.enumuration.inventory.ScratchedGift;
30321 amit.gupta 11
import org.springframework.http.ResponseEntity;
12
import org.springframework.stereotype.Service;
22859 ashik.ali 13
 
30321 amit.gupta 14
import java.time.LocalDate;
15
import java.time.LocalDateTime;
16
import java.util.List;
17
import java.util.Map;
18
 
22859 ashik.ali 19
@Service
20
public interface OrderService {
32724 amit.gupta 21
	int createOrder(CreateOrderRequest createOrderRequest, int fofoId, boolean accessoriesDeals)
25640 tejbeer 22
			throws ProfitMandiBusinessException;
23
 
32724 amit.gupta 24
	void updateCustomerDetails(CustomCustomer customCustomer, String invoiceNumber)
25640 tejbeer 25
			throws ProfitMandiBusinessException;
26
 
32724 amit.gupta 27
	InvoicePdfModel getInvoicePdfModel(int fofoId, int orderId) throws ProfitMandiBusinessException;
25640 tejbeer 28
 
32724 amit.gupta 29
	InvoicePdfModel getInvoicePdfModel(int orderId) throws ProfitMandiBusinessException;
25640 tejbeer 30
 
32724 amit.gupta 31
	String getBillingAddress(CustomerAddress customerAddress);
25640 tejbeer 32
 
32724 amit.gupta 33
	List<CartFofo> cartCheckout(String cartJson) throws ProfitMandiBusinessException;
25640 tejbeer 34
 
32724 amit.gupta 35
	List<FofoOrderItem> getByOrderId(int orderId) throws ProfitMandiBusinessException;
25640 tejbeer 36
 
32724 amit.gupta 37
	Map<String, Object> getSaleHistory(int fofoId, SearchType searchType, String searchValue,
38
                                       LocalDateTime startDate, LocalDateTime endDate, int offset, int limit) throws ProfitMandiBusinessException;
25640 tejbeer 39
 
40
	public Map<String, Object> getSaleHistoryPaginated(int fofoId, SearchType searchType, String searchValue,
31030 amit.gupta 41
													   LocalDateTime startDate, LocalDateTime endDate, int offset, int limit) throws ProfitMandiBusinessException;
25640 tejbeer 42
 
43
	public CustomerCreditNote badReturn(int fofoId, FoiBadReturnRequest foiBadReturnRequest)
44
			throws ProfitMandiBusinessException;
45
 
23654 amit.gupta 46
	public CreditNotePdfModel getCreditNotePdfModel(int customerCreditNoteId) throws ProfitMandiBusinessException;
25640 tejbeer 47
 
29549 amit.gupta 48
	public void cancelOrder(List<String> invoiceNumbers) throws ProfitMandiBusinessException;
25640 tejbeer 49
 
31030 amit.gupta 50
	void reverseActivationScheme(List<Integer> inventoryItemIds) throws ProfitMandiBusinessException;
51
 
24271 amit.gupta 52
	public float getSales(int fofoId, LocalDateTime startDate, LocalDateTime endDate);
25640 tejbeer 53
 
24271 amit.gupta 54
	public float getSales(int fofoId, LocalDate onDate);
25640 tejbeer 55
 
24271 amit.gupta 56
	public float getSales(LocalDateTime onDate);
25640 tejbeer 57
 
24271 amit.gupta 58
	public float getSales(LocalDateTime startDate, LocalDateTime endDate);
25640 tejbeer 59
 
32960 amit.gupta 60
    ScratchedGift getSelectedGift(double purchaseAmount);
25640 tejbeer 61
 
32960 amit.gupta 62
    String getInvoiceNumber(int fofoId, String fofoStoreCode);
63
 
30157 manish 64
 
65
	public ResponseEntity<?> downloadReportInCsv( org.apache.commons.io.output.ByteArrayOutputStream baos , List<List<?>> rows,String fileName);
24917 tejbeer 66
	public boolean notifyColorChange(int orderId, int itemId) throws ProfitMandiBusinessException;
25640 tejbeer 67
 
25083 amit.gupta 68
	public FofoOrder getOrderByInventoryItemId(int inventoryItemId) throws Exception;
27083 amit.gupta 69
 
70
	LocalDateTime getMaxSalesDate(int fofoId, LocalDateTime startDate, LocalDateTime endDate);
27516 amit.gupta 71
 
30321 amit.gupta 72
	InvoicePdfModel getDummyPdfModel(String serialNumber) throws ProfitMandiBusinessException;
28166 tejbeer 73
 
74
	public Map<Integer, Long> carryBagCreditCount(int fofoId) throws ProfitMandiBusinessException;
29549 amit.gupta 75
 
76
	void reverseScheme(FofoOrder fofoOrder) throws ProfitMandiBusinessException;
32607 ranu 77
 
78
	void createMissingScratchOffers();
32724 amit.gupta 79
 
80
	boolean refundOrder(int orderId, String refundedBy, String refundReason) throws ProfitMandiBusinessException;
22859 ashik.ali 81
}