Subversion Repositories SmartDukaan

Rev

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

Rev 32869 Rev 33203
Line 1094... Line 1094...
1094
    public void fixPriceDrop() throws ProfitMandiBusinessException {
1094
    public void fixPriceDrop() throws ProfitMandiBusinessException {
1095
        List<Integer> priceDropIds = Arrays.asList(609, 610, 611, 648, 649, 650, 651, 653, 667, 691, 692, 693, 695, 696, 697, 698, 645, 688);
1095
        List<Integer> priceDropIds = Arrays.asList(609, 610, 611, 648, 649, 650, 651, 653, 667, 691, 692, 693, 695, 696, 697, 698, 645, 688);
1096
        for (int priceDropId : priceDropIds) {
1096
        for (int priceDropId : priceDropIds) {
1097
            PriceDrop pd = priceDropRepository.selectById(priceDropId);
1097
            PriceDrop pd = priceDropRepository.selectById(priceDropId);
1098
            LOGGER.info("Price Drop ---- {}", pd);
1098
            LOGGER.info("Price Drop ---- {}", pd);
1099
            List<ImeiDropSummaryModel> actualList = priceDropService.getAllSerialNumbersByAffectedDate(pd.getAffectedOn(), pd.getCatalogItemId());
1099
            List<ImeiDropSummaryModel> actualList = priceDropService.getAllSerialNumbersByAffectedDate(pd.getAffectedOn(), pd.getCatalogItemId(), Optional.of(pd.getCreatedOn()));
1100
            Map<String, ImeiDropSummaryModel> actualMap = actualList.stream().collect(Collectors.toMap(x -> x.getSerialNumber(), x -> x));
1100
            Map<String, ImeiDropSummaryModel> actualMap = actualList.stream().collect(Collectors.toMap(x -> x.getSerialNumber(), x -> x));
1101
 
1101
 
1102
            List<PriceDropIMEI> priceDropIMEIs = priceDropIMEIRepository.selectByPriceDropId(pd.getId());
1102
            List<PriceDropIMEI> priceDropIMEIs = priceDropIMEIRepository.selectByPriceDropId(pd.getId());
1103
            Map<String, PriceDropIMEI> oldImeisMap = priceDropIMEIs.stream().collect(Collectors.toMap(x -> x.getImei(), x -> x));
1103
            Map<String, PriceDropIMEI> oldImeisMap = priceDropIMEIs.stream().collect(Collectors.toMap(x -> x.getImei(), x -> x));
1104
 
1104