Subversion Repositories SmartDukaan

Rev

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

Rev 32784 Rev 32789
Line 115... Line 115...
115
 
115
 
116
    @Autowired
116
    @Autowired
117
    private UserRepository userUserRepository;
117
    private UserRepository userUserRepository;
118
 
118
 
119
    @Autowired
119
    @Autowired
120
    private BluedartService blueDartService;
120
    private BluedartService bluedartService;
121
 
121
 
122
    private static final Logger LOGGER = LogManager.getLogger(LogisticsController.class);
122
    private static final Logger LOGGER = LogManager.getLogger(LogisticsController.class);
123
 
123
 
124
    @RequestMapping(value = "/logistics", method = RequestMethod.GET)
124
    @RequestMapping(value = "/logistics", method = RequestMethod.GET)
125
    public String logistics(HttpServletRequest request, Model model) throws Exception {
125
    public String logistics(HttpServletRequest request, Model model) throws Exception {
Line 172... Line 172...
172
 
172
 
173
        List<CSVRecord> records = FileUtil.readFile(file);
173
        List<CSVRecord> records = FileUtil.readFile(file);
174
 
174
 
175
        List<BilledOrderListModel> billedOrderListModels = new ArrayList<>();
175
        List<BilledOrderListModel> billedOrderListModels = new ArrayList<>();
176
        for (CSVRecord record : records) {
176
        for (CSVRecord record : records) {
177
            BilledOrderListModel blm = createBilleOrder(record);
177
            BilledOrderListModel billedOrderListModel = createBilleOrder(record);
178
            billedOrderListModels.add(blm);
178
            billedOrderListModels.add(billedOrderListModel);
179
            LOGGER.info("records" + record.get(1));
179
            LOGGER.info("records" + record.get(1));
180
        }
180
        }
181
 
181
 
182
        LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
182
        LoginDetails loginDetails = cookiesProcessor.getCookiesObject(request);
183
        String email = loginDetails.getEmailId();
183
        String email = loginDetails.getEmailId();
Line 187... Line 187...
187
 
187
 
188
        List<Position> warehousePositions = positions.stream().filter(x -> x.getCategoryId() == ProfitMandiConstants.TICKET_CATEGORY_WAREHOUSE).collect(Collectors.toList());
188
        List<Position> warehousePositions = positions.stream().filter(x -> x.getCategoryId() == ProfitMandiConstants.TICKET_CATEGORY_WAREHOUSE).collect(Collectors.toList());
189
        Set<CustomRetailer> positionRetailers = new HashSet<>();
189
        Set<CustomRetailer> positionRetailers = new HashSet<>();
190
        csService.getPositionCustomRetailerMap(warehousePositions).values().forEach(customRetailers -> {
190
        csService.getPositionCustomRetailerMap(warehousePositions).values().forEach(customRetailers -> {
191
            positionRetailers.addAll(customRetailers);
191
            positionRetailers.addAll(customRetailers);
192
 
-
 
193
        });
192
        });
194
 
193
 
195
        LOGGER.info("positionRetailers" + positionRetailers);
194
        LOGGER.info("positionRetailers" + positionRetailers);
196
        List<Integer> fofoIds = new ArrayList<>();
195
        List<Integer> fofoIds = new ArrayList<>();
197
        List<Integer> warehouseIds = new ArrayList<>();
196
        List<Integer> warehouseIds = new ArrayList<>();
Line 270... Line 269...
270
                if (!unserviceablePincode.isEmpty()) {
269
                if (!unserviceablePincode.isEmpty()) {
271
                    throw new ProfitMandiBusinessException("Uploaded File", "", "Orders " + unserviceablePincode + " Unserviceable Pincode");
270
                    throw new ProfitMandiBusinessException("Uploaded File", "", "Orders " + unserviceablePincode + " Unserviceable Pincode");
272
 
271
 
273
                }
272
                }
274
 
273
 
275
                List<BilledOrderListModel> blueDartOrders = blueDartService.getAirwayBillNo(blueDartAirbillBilledOrderMap, authUser.getEmailId());
274
                List<BilledOrderListModel> blueDartOrders = bluedartService.getAirwayBillNo(blueDartAirbillBilledOrderMap, authUser.getEmailId());
276
 
275
 
277
                orderList.addAll(blueDartOrders);
276
                orderList.addAll(blueDartOrders);
278
            }
277
            }
279
            Map<String, BilledOrderListModel> uniqueCombinations = new HashMap<>();
278
            Map<String, BilledOrderListModel> uniqueCombinations = new HashMap<>();
280
            for (BilledOrderListModel bl : orderList) {
279
            for (BilledOrderListModel bl : orderList) {