Subversion Repositories SmartDukaan

Rev

Rev 35034 | 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
 
35034 amit 27
	InvoicePdfModel getInvoicePdfModel(FofoOrder fofoOrder) throws ProfitMandiBusinessException;
28
 
32724 amit.gupta 29
	InvoicePdfModel getInvoicePdfModel(int fofoId, int orderId) throws ProfitMandiBusinessException;
25640 tejbeer 30
 
32724 amit.gupta 31
	InvoicePdfModel getInvoicePdfModel(int orderId) throws ProfitMandiBusinessException;
25640 tejbeer 32
 
32724 amit.gupta 33
	String getBillingAddress(CustomerAddress customerAddress);
25640 tejbeer 34
 
32724 amit.gupta 35
	List<CartFofo> cartCheckout(String cartJson) throws ProfitMandiBusinessException;
25640 tejbeer 36
 
32724 amit.gupta 37
	List<FofoOrderItem> getByOrderId(int orderId) throws ProfitMandiBusinessException;
25640 tejbeer 38
 
32724 amit.gupta 39
	Map<String, Object> getSaleHistory(int fofoId, SearchType searchType, String searchValue,
40
                                       LocalDateTime startDate, LocalDateTime endDate, int offset, int limit) throws ProfitMandiBusinessException;
25640 tejbeer 41
 
42
	public Map<String, Object> getSaleHistoryPaginated(int fofoId, SearchType searchType, String searchValue,
31030 amit.gupta 43
													   LocalDateTime startDate, LocalDateTime endDate, int offset, int limit) throws ProfitMandiBusinessException;
25640 tejbeer 44
 
45
	public CustomerCreditNote badReturn(int fofoId, FoiBadReturnRequest foiBadReturnRequest)
46
			throws ProfitMandiBusinessException;
34141 tejus.loha 47
public CustomerCreditNote badReturn(String loginMail,int fofoId, FoiBadReturnRequest foiBadReturnRequest)
48
			throws ProfitMandiBusinessException;
25640 tejbeer 49
 
23654 amit.gupta 50
	public CreditNotePdfModel getCreditNotePdfModel(int customerCreditNoteId) throws ProfitMandiBusinessException;
25640 tejbeer 51
 
29549 amit.gupta 52
	public void cancelOrder(List<String> invoiceNumbers) throws ProfitMandiBusinessException;
25640 tejbeer 53
 
31030 amit.gupta 54
	void reverseActivationScheme(List<Integer> inventoryItemIds) throws ProfitMandiBusinessException;
55
 
24271 amit.gupta 56
	public float getSales(int fofoId, LocalDateTime startDate, LocalDateTime endDate);
25640 tejbeer 57
 
24271 amit.gupta 58
	public float getSales(int fofoId, LocalDate onDate);
25640 tejbeer 59
 
24271 amit.gupta 60
	public float getSales(LocalDateTime onDate);
25640 tejbeer 61
 
24271 amit.gupta 62
	public float getSales(LocalDateTime startDate, LocalDateTime endDate);
25640 tejbeer 63
 
32961 amit.gupta 64
	void processScratchOffer(FofoOrder fofoOrder) throws ProfitMandiBusinessException;
25640 tejbeer 65
 
33895 ranu 66
	ScratchedGift getSelectedGift(double purchaseAmount,int fofoId) throws ProfitMandiBusinessException;
32961 amit.gupta 67
 
32960 amit.gupta 68
    String getInvoiceNumber(int fofoId, String fofoStoreCode);
69
 
30157 manish 70
 
71
	public ResponseEntity<?> downloadReportInCsv( org.apache.commons.io.output.ByteArrayOutputStream baos , List<List<?>> rows,String fileName);
36309 amit 72
	public boolean applyColorChange(int orderId, int itemId) throws ProfitMandiBusinessException;
25640 tejbeer 73
 
25083 amit.gupta 74
	public FofoOrder getOrderByInventoryItemId(int inventoryItemId) throws Exception;
27083 amit.gupta 75
 
76
	LocalDateTime getMaxSalesDate(int fofoId, LocalDateTime startDate, LocalDateTime endDate);
27516 amit.gupta 77
 
30321 amit.gupta 78
	InvoicePdfModel getDummyPdfModel(String serialNumber) throws ProfitMandiBusinessException;
28166 tejbeer 79
 
34443 vikas.jang 80
	//should no longer to be used
28166 tejbeer 81
	public Map<Integer, Long> carryBagCreditCount(int fofoId) throws ProfitMandiBusinessException;
29549 amit.gupta 82
 
83
	void reverseScheme(FofoOrder fofoOrder) throws ProfitMandiBusinessException;
32607 ranu 84
 
85
	void createMissingScratchOffers();
32724 amit.gupta 86
 
87
	boolean refundOrder(int orderId, String refundedBy, String refundReason) throws ProfitMandiBusinessException;
22859 ashik.ali 88
}