Subversion Repositories SmartDukaan

Rev

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

Rev 25378 Rev 25547
Line 29... Line 29...
29
import org.springframework.http.HttpStatus;
29
import org.springframework.http.HttpStatus;
30
import org.springframework.http.ResponseEntity;
30
import org.springframework.http.ResponseEntity;
31
import org.springframework.stereotype.Controller;
31
import org.springframework.stereotype.Controller;
32
import org.springframework.transaction.annotation.Transactional;
32
import org.springframework.transaction.annotation.Transactional;
33
import org.springframework.ui.Model;
33
import org.springframework.ui.Model;
34
import org.springframework.web.bind.annotation.PathVariable;
-
 
35
import org.springframework.web.bind.annotation.RequestBody;
34
import org.springframework.web.bind.annotation.RequestBody;
36
import org.springframework.web.bind.annotation.RequestMapping;
35
import org.springframework.web.bind.annotation.RequestMapping;
37
import org.springframework.web.bind.annotation.RequestMethod;
36
import org.springframework.web.bind.annotation.RequestMethod;
38
import org.springframework.web.bind.annotation.RequestParam;
37
import org.springframework.web.bind.annotation.RequestParam;
39
 
38
 
40
import com.mongodb.TaggableReadPreference;
-
 
41
import com.spice.profitmandi.common.enumuration.CounterSize;
39
import com.spice.profitmandi.common.enumuration.CounterSize;
42
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
40
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
43
import com.spice.profitmandi.common.model.BrandPerformance;
41
import com.spice.profitmandi.common.model.BrandPerformance;
44
import com.spice.profitmandi.common.model.CatalogListingModel;
42
import com.spice.profitmandi.common.model.CatalogListingModel;
45
import com.spice.profitmandi.common.model.CustomRetailer;
43
import com.spice.profitmandi.common.model.CustomRetailer;
Line 60... Line 58...
60
import com.spice.profitmandi.dao.repository.transaction.UserWalletRepository;
58
import com.spice.profitmandi.dao.repository.transaction.UserWalletRepository;
61
import com.spice.profitmandi.dao.repository.user.UserRepository;
59
import com.spice.profitmandi.dao.repository.user.UserRepository;
62
import com.spice.profitmandi.service.authentication.RoleManager;
60
import com.spice.profitmandi.service.authentication.RoleManager;
63
import com.spice.profitmandi.service.inventory.StockAllocationService;
61
import com.spice.profitmandi.service.inventory.StockAllocationService;
64
import com.spice.profitmandi.service.user.RetailerService;
62
import com.spice.profitmandi.service.user.RetailerService;
-
 
63
import com.spice.profitmandi.service.wallet.WalletService;
65
import com.spice.profitmandi.thrift.clients.PaymentClient;
64
import com.spice.profitmandi.thrift.clients.PaymentClient;
66
import com.spice.profitmandi.thrift.clients.TransactionClient;
65
import com.spice.profitmandi.thrift.clients.TransactionClient;
67
import com.spice.profitmandi.thrift.clients.UserClient;
66
import com.spice.profitmandi.thrift.clients.UserClient;
68
import com.spice.profitmandi.web.model.LoginDetails;
67
import com.spice.profitmandi.web.model.LoginDetails;
69
import com.spice.profitmandi.web.util.CookiesProcessor;
68
import com.spice.profitmandi.web.util.CookiesProcessor;
Line 78... Line 77...
78
import in.shop2020.model.v1.order.TransactionService;
77
import in.shop2020.model.v1.order.TransactionService;
79
import in.shop2020.model.v1.order.TransactionStatus;
78
import in.shop2020.model.v1.order.TransactionStatus;
80
import in.shop2020.model.v1.user.ItemPriceQuantity;
79
import in.shop2020.model.v1.user.ItemPriceQuantity;
81
import in.shop2020.model.v1.user.ShoppingCartException;
80
import in.shop2020.model.v1.user.ShoppingCartException;
82
import in.shop2020.model.v1.user.UserContextService.Client;
81
import in.shop2020.model.v1.user.UserContextService.Client;
83
import in.shop2020.model.v1.user.UserContextService.forgotPassword_args;
-
 
84
import in.shop2020.payments.Attribute;
82
import in.shop2020.payments.Attribute;
85
import in.shop2020.payments.PaymentException;
83
import in.shop2020.payments.PaymentException;
86
import in.shop2020.payments.PaymentStatus;
84
import in.shop2020.payments.PaymentStatus;
87
 
85
 
88
@Controller
86
@Controller
Line 100... Line 98...
100
 
98
 
101
	private final List<OrderStatus> partnerPendingOrderList = Arrays.asList(OrderStatus.ACCEPTED,
99
	private final List<OrderStatus> partnerPendingOrderList = Arrays.asList(OrderStatus.ACCEPTED,
102
			OrderStatus.SUBMITTED_FOR_PROCESSING, OrderStatus.BILLED, OrderStatus.SHIPPED_FROM_WH,
100
			OrderStatus.SUBMITTED_FOR_PROCESSING, OrderStatus.BILLED, OrderStatus.SHIPPED_FROM_WH,
103
			OrderStatus.SHIPPED_TO_DESTINATION_CITY, OrderStatus.SHIPPED_TO_LOGST,
101
			OrderStatus.SHIPPED_TO_DESTINATION_CITY, OrderStatus.SHIPPED_TO_LOGST,
104
			OrderStatus.REACHED_DESTINATION_CITY);
102
			OrderStatus.REACHED_DESTINATION_CITY);
-
 
103
	
-
 
104
	@Autowired
-
 
105
	WalletService walletService;
105
 
106
 
106
	@Autowired
107
	@Autowired
107
	private CookiesProcessor cookiesProcessor;
108
	private CookiesProcessor cookiesProcessor;
108
 
109
 
109
	@Autowired
110
	@Autowired
Line 471... Line 472...
471
		model.addAttribute("accsBrandPerformanceList", accsBrandPerformanceList);
472
		model.addAttribute("accsBrandPerformanceList", accsBrandPerformanceList);
472
		model.addAttribute("counterSizes", CounterSize.values());
473
		model.addAttribute("counterSizes", CounterSize.values());
473
		model.addAttribute("isAdmin", roleManager.isAdmin(roleIds));
474
		model.addAttribute("isAdmin", roleManager.isAdmin(roleIds));
474
		model.addAttribute("totalAmount", totalAmount);
475
		model.addAttribute("totalAmount", totalAmount);
475
		model.addAttribute("totalPcs", totalPcs);
476
		model.addAttribute("totalPcs", totalPcs);
476
		model.addAttribute("walletAmount", userWalletRepository.selectByRetailerId(fofoId).getAmount());
477
		model.addAttribute("walletAmount", walletService.getWalletAmount(fofoId));
477
		// model.addAttribute("itemCisMap", itemCisMap);
478
		// model.addAttribute("itemCisMap", itemCisMap);
478
		return "open-indent";
479
		return "open-indent";
479
	}
480
	}
480
 
481
 
481
	private List<Order> filterValidOrders(List<Order> lastOrdersList) {
482
	private List<Order> filterValidOrders(List<Order> lastOrdersList) {