Subversion Repositories SmartDukaan

Rev

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

Rev 34506 Rev 34513
Line 49... Line 49...
49
import com.spice.profitmandi.dao.repository.warehouse.BrandRegionMappingRepository;
49
import com.spice.profitmandi.dao.repository.warehouse.BrandRegionMappingRepository;
50
import com.spice.profitmandi.service.FofoUser;
50
import com.spice.profitmandi.service.FofoUser;
51
import com.spice.profitmandi.service.NotificationService;
51
import com.spice.profitmandi.service.NotificationService;
52
import com.spice.profitmandi.service.RbmTargetService;
52
import com.spice.profitmandi.service.RbmTargetService;
53
import com.spice.profitmandi.service.authentication.RoleManager;
53
import com.spice.profitmandi.service.authentication.RoleManager;
-
 
54
import com.spice.profitmandi.service.catalog.BrandsService;
54
import com.spice.profitmandi.service.inventory.*;
55
import com.spice.profitmandi.service.inventory.*;
55
import com.spice.profitmandi.service.user.RetailerService;
56
import com.spice.profitmandi.service.user.RetailerService;
56
import com.spice.profitmandi.service.wallet.WalletService;
57
import com.spice.profitmandi.service.wallet.WalletService;
57
import com.spice.profitmandi.thrift.clients.PaymentClient;
58
import com.spice.profitmandi.thrift.clients.PaymentClient;
58
import com.spice.profitmandi.thrift.clients.UserClient;
59
import com.spice.profitmandi.thrift.clients.UserClient;
Line 245... Line 246...
245
 
246
 
246
    @Autowired
247
    @Autowired
247
    FofoUser fofoUser;
248
    FofoUser fofoUser;
248
 
249
 
249
    @Autowired
250
    @Autowired
-
 
251
    BrandsService brandsService;
-
 
252
 
-
 
253
    @Autowired
250
    SDCreditRequirementRepository sdCreditRequirementRepository;
254
    SDCreditRequirementRepository sdCreditRequirementRepository;
251
 
255
 
252
    @RequestMapping(value = "/open-indent/save", method = RequestMethod.POST)
256
    @RequestMapping(value = "/open-indent/save", method = RequestMethod.POST)
253
    public String saveOpenIndent(HttpServletRequest request, Model model, @RequestParam int catalogId,
257
    public String saveOpenIndent(HttpServletRequest request, Model model, @RequestParam int catalogId,
254
                                 @RequestParam int itemQty, @RequestParam int fofoId) throws Exception {
258
                                 @RequestParam int itemQty, @RequestParam int fofoId) throws Exception {
Line 2347... Line 2351...
2347
        List<String> remainingBrandsWithoutStock = ProfitMandiConstants.BRANDS.stream()
2351
        List<String> remainingBrandsWithoutStock = ProfitMandiConstants.BRANDS.stream()
2348
                .filter(x -> !brandToMtdMap.containsKey(x))
2352
                .filter(x -> !brandToMtdMap.containsKey(x))
2349
                .filter(x -> !sortedBrandStatusWiseStockListMap.containsKey(x)) // no stock
2353
                .filter(x -> !sortedBrandStatusWiseStockListMap.containsKey(x)) // no stock
2350
                .collect(Collectors.toList());
2354
                .collect(Collectors.toList());
2351
 
2355
 
2352
        List<String> finalSortedBrands = new ArrayList<>();
2356
        List<String> sortedBrands = new ArrayList<>();
2353
        finalSortedBrands.addAll(sortedBrandsByMtd);
2357
        sortedBrands.addAll(sortedBrandsByMtd);
2354
        finalSortedBrands.addAll(remainingBrands);
2358
        sortedBrands.addAll(remainingBrands);
2355
        finalSortedBrands.addAll(remainingBrandsWithoutStock);
2359
        sortedBrands.addAll(remainingBrandsWithoutStock);
-
 
2360
 
-
 
2361
        List<String> partnerIneligibleBrands = brandsService.partnerIneligibleBrands(fofoId);
-
 
2362
 
-
 
2363
        List<String> finalSortedBrands = sortedBrands.stream().filter(x -> !partnerIneligibleBrands.contains(x) && !"itel".equalsIgnoreCase(x)).collect(Collectors.toList());
2356
 
2364
 
2357
        Map<Integer, Integer> processingOrderMap = null;
2365
        Map<Integer, Integer> processingOrderMap = null;
2358
        List<PartnerStockDetailModel> pendingIndents = new ArrayList<>();
2366
        List<PartnerStockDetailModel> pendingIndents = new ArrayList<>();
2359
        Map<Integer, PartnerStockDetailModel> pendingIndentsDetailMap = new HashMap<>();
2367
        Map<Integer, PartnerStockDetailModel> pendingIndentsDetailMap = new HashMap<>();
2360
 
2368