Subversion Repositories SmartDukaan

Rev

Rev 4682 | Rev 5348 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4682 Rev 4689
Line 28... Line 28...
28
import in.shop2020.thrift.clients.PaymentClient;
28
import in.shop2020.thrift.clients.PaymentClient;
29
import in.shop2020.thrift.clients.TransactionClient;
29
import in.shop2020.thrift.clients.TransactionClient;
30
import in.shop2020.thrift.clients.UserClient;
30
import in.shop2020.thrift.clients.UserClient;
31
import in.shop2020.util.CRMConstants;
31
import in.shop2020.util.CRMConstants;
32
import in.shop2020.util.CRMConstants.EscalationMatrix;
32
import in.shop2020.util.CRMConstants.EscalationMatrix;
33
import in.shop2020.util.CRMConstants.CODCancelMatrix;
-
 
34
import in.shop2020.utils.HelperService.Client;
33
import in.shop2020.utils.HelperService.Client;
35
import in.shop2020.utils.HelperServiceException;
34
import in.shop2020.utils.HelperServiceException;
36
import in.shop2020.utils.ModelUtils;
35
import in.shop2020.utils.ModelUtils;
37
 
36
 
38
import java.text.ParseException;
37
import java.text.ParseException;
Line 132... Line 131...
132
                    log.error("Could not fetch user details", e);
131
                    log.error("Could not fetch user details", e);
133
                }
132
                }
134
            }
133
            }
135
 
134
 
136
            customerEmailId = ticket.getCustomerEmailId();
135
            customerEmailId = ticket.getCustomerEmailId();
137
            
136
 
138
            if (TicketCategory.ORDER_CANCELLATION.equals(ticket.getCategory())) {
137
            if (TicketCategory.ORDER_CANCELLATION.equals(ticket.getCategory())) {
139
                log.info("Fetching orders for " + ticket.getCustomerId());
138
                log.info("Fetching orders for " + ticket.getCustomerId());
140
                orders = new ArrayList<Order>();
139
                orders = new ArrayList<Order>();
141
                transactionServiceClient = new TransactionClient().getClient();
140
                transactionServiceClient = new TransactionClient().getClient();
142
                Order order = transactionServiceClient.getOrder(ticket.getOrderId());
141
                for (Order order : transactionServiceClient
143
                log.info("Processing Order: " + order);
142
                        .getOrdersForCustomer(ticket.getCustomerId(), 0, 0,
144
                if(OrderStatus.CANCEL_REQUEST_RECEIVED.equals(order.getStatus())) {
143
                                Collections.singletonList(OrderStatus.CANCEL_REQUEST_RECEIVED))) {
-
 
144
                    log.info("Processing Order: " + order.getId());
145
                    orders.add(order);
145
                    orders.add(order);
146
                }
146
                }
147
            }
147
            }
148
 
148
 
149
            if (TicketCategory.COD_VERIFICATION.equals(ticket.getCategory())) {
149
            if (TicketCategory.COD_VERIFICATION.equals(ticket.getCategory())) {
Line 157... Line 157...
157
                    if (order.isCod()) {
157
                    if (order.isCod()) {
158
                        orders.add(order);
158
                        orders.add(order);
159
                    }
159
                    }
160
                }
160
                }
161
            }
161
            }
162
            
162
 
163
            if (TicketCategory.DOA_RECEIVED.equals(ticket.getCategory())) {
163
            if (TicketCategory.DOA_RECEIVED.equals(ticket.getCategory())) {
164
                log.info("Fetching orders for " + ticket.getCustomerId());
164
                log.info("Fetching orders for " + ticket.getCustomerId());
165
                orders = new ArrayList<Order>();
165
                orders = new ArrayList<Order>();
166
                transactionServiceClient = new TransactionClient().getClient();
166
                transactionServiceClient = new TransactionClient().getClient();
167
                for (Order order : transactionServiceClient
167
                for (Order order : transactionServiceClient
Line 171... Line 171...
171
                    if (order != null) {
171
                    if (order != null) {
172
                        orders.add(order);
172
                        orders.add(order);
173
                    }
173
                    }
174
                }
174
                }
175
            }
175
            }
176
            
176
 
177
            if (TicketCategory.RETURN_FORM.equals(ticket.getCategory())) {
177
            if (TicketCategory.RETURN_FORM.equals(ticket.getCategory())) {
178
                log.info("Fetching orders for " + ticket.getCustomerId());
178
                log.info("Fetching orders for " + ticket.getCustomerId());
179
                orders = new ArrayList<Order>();
179
                orders = new ArrayList<Order>();
180
                transactionServiceClient = new TransactionClient().getClient();
180
                transactionServiceClient = new TransactionClient().getClient();
181
                for (Order order : transactionServiceClient
181
                for (Order order : transactionServiceClient
Line 995... Line 995...
995
 
995
 
996
    public EscalationMatrix[] getEscalationMatrix () {
996
    public EscalationMatrix[] getEscalationMatrix () {
997
        return CRMConstants.EscalationMatrix.values();
997
        return CRMConstants.EscalationMatrix.values();
998
    }
998
    }
999
 
999
 
1000
    public CODCancelMatrix[] getCODCancelMatrix () {
-
 
1001
        return CRMConstants.CODCancelMatrix.values();
-
 
1002
    }
-
 
1003
 
-
 
1004
    public String getAddress(Order order) {
1000
    public String getAddress(Order order) {
1005
        return ModelUtils.extractAddressFromOrder(order);
1001
        return ModelUtils.extractAddressFromOrder(order);
1006
    }
1002
    }
1007
 
1003
 
1008
    public String getProductName(LineItem lineItem) {
1004
    public String getProductName(LineItem lineItem) {