Subversion Repositories SmartDukaan

Rev

Rev 34194 | Rev 35034 | 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.*;
34194 ranu 6
import com.spice.profitmandi.dao.entity.fofo.CustomerAddress;
7
import com.spice.profitmandi.dao.entity.fofo.CustomerCreditNote;
8
import com.spice.profitmandi.dao.entity.fofo.FofoOrder;
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)
34194 ranu 22
			throws Exception;
25640 tejbeer 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;
34141 tejus.loha 45
public CustomerCreditNote badReturn(String loginMail,int fofoId, FoiBadReturnRequest foiBadReturnRequest)
46
			throws ProfitMandiBusinessException;
25640 tejbeer 47
 
23654 amit.gupta 48
	public CreditNotePdfModel getCreditNotePdfModel(int customerCreditNoteId) throws ProfitMandiBusinessException;
25640 tejbeer 49
 
29549 amit.gupta 50
	public void cancelOrder(List<String> invoiceNumbers) throws ProfitMandiBusinessException;
25640 tejbeer 51
 
31030 amit.gupta 52
	void reverseActivationScheme(List<Integer> inventoryItemIds) throws ProfitMandiBusinessException;
53
 
24271 amit.gupta 54
	public float getSales(int fofoId, LocalDateTime startDate, LocalDateTime endDate);
25640 tejbeer 55
 
24271 amit.gupta 56
	public float getSales(int fofoId, LocalDate onDate);
25640 tejbeer 57
 
24271 amit.gupta 58
	public float getSales(LocalDateTime onDate);
25640 tejbeer 59
 
24271 amit.gupta 60
	public float getSales(LocalDateTime startDate, LocalDateTime endDate);
25640 tejbeer 61
 
32961 amit.gupta 62
	void processScratchOffer(FofoOrder fofoOrder) throws ProfitMandiBusinessException;
25640 tejbeer 63
 
33895 ranu 64
	ScratchedGift getSelectedGift(double purchaseAmount,int fofoId) throws ProfitMandiBusinessException;
32961 amit.gupta 65
 
32960 amit.gupta 66
    String getInvoiceNumber(int fofoId, String fofoStoreCode);
67
 
30157 manish 68
 
69
	public ResponseEntity<?> downloadReportInCsv( org.apache.commons.io.output.ByteArrayOutputStream baos , List<List<?>> rows,String fileName);
24917 tejbeer 70
	public boolean notifyColorChange(int orderId, int itemId) throws ProfitMandiBusinessException;
25640 tejbeer 71
 
25083 amit.gupta 72
	public FofoOrder getOrderByInventoryItemId(int inventoryItemId) throws Exception;
27083 amit.gupta 73
 
74
	LocalDateTime getMaxSalesDate(int fofoId, LocalDateTime startDate, LocalDateTime endDate);
27516 amit.gupta 75
 
30321 amit.gupta 76
	InvoicePdfModel getDummyPdfModel(String serialNumber) throws ProfitMandiBusinessException;
28166 tejbeer 77
 
34443 vikas.jang 78
	//should no longer to be used
28166 tejbeer 79
	public Map<Integer, Long> carryBagCreditCount(int fofoId) throws ProfitMandiBusinessException;
29549 amit.gupta 80
 
81
	void reverseScheme(FofoOrder fofoOrder) throws ProfitMandiBusinessException;
32607 ranu 82
 
83
	void createMissingScratchOffers();
32724 amit.gupta 84
 
85
	boolean refundOrder(int orderId, String refundedBy, String refundReason) throws ProfitMandiBusinessException;
22859 ashik.ali 86
}