| Line 792... |
Line 792... |
| 792 |
fofoStore.setCounterSize(updateRetailerRequest.getCountersize());
|
792 |
fofoStore.setCounterSize(updateRetailerRequest.getCountersize());
|
| 793 |
fofoStore.setMinimumInvestment(updateRetailerRequest.getMinInvestment());
|
793 |
fofoStore.setMinimumInvestment(updateRetailerRequest.getMinInvestment());
|
| 794 |
|
794 |
|
| 795 |
fofoStore.setCounterPotential(updateRetailerRequest.getCounterPotential());
|
795 |
fofoStore.setCounterPotential(updateRetailerRequest.getCounterPotential());
|
| 796 |
fofoStore.setWarehouseId(updateRetailerRequest.getWarehouseId());
|
796 |
fofoStore.setWarehouseId(updateRetailerRequest.getWarehouseId());
|
| 797 |
String latestStoreCode = fofoStoreRepository.selectLatestStore().getCode();
|
797 |
int nextStoreCodeInt = fofoStoreRepository.selectLatestStore().getCodeInt() + 1;
|
| 798 |
int latestCodeCounter = Integer.parseInt(latestStoreCode.replaceAll("[A-Z]", ""));
|
- |
|
| - |
|
798 |
|
| 799 |
String fofoStoreCode = StringUtils.generateFofoStoreSequence(
|
799 |
String fofoStoreCode = StringUtils.generateFofoStoreSequence(
|
| 800 |
districtMaster.getStateShortName() + districtMaster.getShortName(), latestCodeCounter + 1);
|
800 |
districtMaster.getStateShortName() + districtMaster.getShortName(), nextStoreCodeInt);
|
| 801 |
fofoStore.setCode(fofoStoreCode);
|
801 |
fofoStore.setCode(fofoStoreCode);
|
| - |
|
802 |
fofoStore.setCodeInt(nextStoreCodeInt);
|
| 802 |
fofoStore.setBagsLastCredited(LocalDateTime.now());
|
803 |
fofoStore.setBagsLastCredited(LocalDateTime.now());
|
| 803 |
fofoStore.setFofoType(updateRetailerRequest.getFofoType());
|
804 |
fofoStore.setFofoType(updateRetailerRequest.getFofoType());
|
| 804 |
fofoStore.setActivationType(ActivationType.ACTIVE);
|
805 |
fofoStore.setActivationType(ActivationType.ACTIVE);
|
| 805 |
fofoStoreRepository.persist(fofoStore);
|
806 |
fofoStoreRepository.persist(fofoStore);
|
| 806 |
|
807 |
|