| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.web.controller;
|
1 |
package com.spice.profitmandi.web.controller;
|
| 2 |
|
2 |
|
| - |
|
3 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 3 |
import com.spice.profitmandi.common.util.FileUtil;
|
4 |
import com.spice.profitmandi.common.util.FileUtil;
|
| 4 |
import com.spice.profitmandi.common.util.FormattingUtils;
|
5 |
import com.spice.profitmandi.common.util.FormattingUtils;
|
| 5 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
6 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
| 6 |
import com.spice.profitmandi.dao.entity.fofo.SamsungPCM;
|
7 |
import com.spice.profitmandi.dao.entity.fofo.SamsungPCM;
|
| 7 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
8 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
| Line 48... |
Line 49... |
| 48 |
|
49 |
|
| 49 |
@Autowired
|
50 |
@Autowired
|
| 50 |
WarehouseInventoryItemRepository warehouseInventoryItemRepository;
|
51 |
WarehouseInventoryItemRepository warehouseInventoryItemRepository;
|
| 51 |
|
52 |
|
| 52 |
@RequestMapping(value = "/brand-pcm", method = RequestMethod.GET)
|
53 |
@RequestMapping(value = "/brand-pcm", method = RequestMethod.GET)
|
| 53 |
public String brandPcm(Model model) {
|
54 |
public String brandPcm(Model model) throws ProfitMandiBusinessException {
|
| 54 |
Map<Integer, LocalDate> samsungPCMMap = samsungPCMRepository.selectAll().stream().collect(Collectors.toMap(x -> x.getFofoId(), x -> x.getPcmDate()));
|
55 |
Map<Integer, LocalDate> samsungPCMMap = samsungPCMRepository.selectAll().stream().collect(Collectors.toMap(x -> x.getFofoId(), x -> x.getPcmDate()));
|
| 55 |
model.addAttribute("samsungPCMMap", samsungPCMMap);
|
56 |
model.addAttribute("samsungPCMMap", samsungPCMMap);
|
| 56 |
model.addAttribute("retailerMap", retailerService.getAllFofoRetailers());
|
57 |
model.addAttribute("retailerMap", retailerService.getAllFofoRetailers());
|
| 57 |
return "manage-pcm";
|
58 |
return "manage-pcm";
|
| 58 |
}
|
59 |
}
|