| Line 55... |
Line 55... |
| 55 |
import com.spice.profitmandi.common.util.ExcelUtils;
|
55 |
import com.spice.profitmandi.common.util.ExcelUtils;
|
| 56 |
import com.spice.profitmandi.common.util.FileUtil;
|
56 |
import com.spice.profitmandi.common.util.FileUtil;
|
| 57 |
import com.spice.profitmandi.common.util.StringUtils;
|
57 |
import com.spice.profitmandi.common.util.StringUtils;
|
| 58 |
import com.spice.profitmandi.common.util.WalletHistoryModel;
|
58 |
import com.spice.profitmandi.common.util.WalletHistoryModel;
|
| 59 |
import com.spice.profitmandi.dao.entity.dtr.CreditAccount;
|
59 |
import com.spice.profitmandi.dao.entity.dtr.CreditAccount;
|
| - |
|
60 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
| 60 |
import com.spice.profitmandi.dao.entity.transaction.AddWalletRequest;
|
61 |
import com.spice.profitmandi.dao.entity.transaction.AddWalletRequest;
|
| 61 |
import com.spice.profitmandi.dao.entity.transaction.ManualPaymentType;
|
62 |
import com.spice.profitmandi.dao.entity.transaction.ManualPaymentType;
|
| 62 |
import com.spice.profitmandi.dao.entity.transaction.UnsettledPayment;
|
63 |
import com.spice.profitmandi.dao.entity.transaction.UnsettledPayment;
|
| 63 |
import com.spice.profitmandi.dao.entity.transaction.UserWallet;
|
64 |
import com.spice.profitmandi.dao.entity.transaction.UserWallet;
|
| 64 |
import com.spice.profitmandi.dao.entity.transaction.UserWalletHistory;
|
65 |
import com.spice.profitmandi.dao.entity.transaction.UserWalletHistory;
|
| Line 67... |
Line 68... |
| 67 |
import com.spice.profitmandi.dao.repository.catalog.AddWalletRequestRepository;
|
68 |
import com.spice.profitmandi.dao.repository.catalog.AddWalletRequestRepository;
|
| 68 |
import com.spice.profitmandi.dao.repository.catalog.ManualPaymentRequestRepository;
|
69 |
import com.spice.profitmandi.dao.repository.catalog.ManualPaymentRequestRepository;
|
| 69 |
import com.spice.profitmandi.dao.repository.catalog.UnsettledPaymentsRepository;
|
70 |
import com.spice.profitmandi.dao.repository.catalog.UnsettledPaymentsRepository;
|
| 70 |
import com.spice.profitmandi.dao.repository.dtr.CreditAccountRepository;
|
71 |
import com.spice.profitmandi.dao.repository.dtr.CreditAccountRepository;
|
| 71 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
72 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
| 72 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
|
- |
|
| 73 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
73 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
| 74 |
import com.spice.profitmandi.dao.repository.dtr.UserRepository;
|
- |
|
| 75 |
import com.spice.profitmandi.dao.repository.transaction.OrderRepository;
|
74 |
import com.spice.profitmandi.dao.repository.transaction.OrderRepository;
|
| 76 |
import com.spice.profitmandi.dao.repository.transaction.StatementDetailModel;
|
75 |
import com.spice.profitmandi.dao.repository.transaction.StatementDetailModel;
|
| 77 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletHistoryRepository;
|
76 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletHistoryRepository;
|
| 78 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletRepository;
|
77 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletRepository;
|
| 79 |
import com.spice.profitmandi.service.authentication.RoleManager;
|
78 |
import com.spice.profitmandi.service.authentication.RoleManager;
|
| Line 1048... |
Line 1047... |
| 1048 |
@RequestMapping(value = "/getCreditDetail", method = RequestMethod.GET)
|
1047 |
@RequestMapping(value = "/getCreditDetail", method = RequestMethod.GET)
|
| 1049 |
public String getCreditDetail(HttpServletRequest request, Model model) throws Exception {
|
1048 |
public String getCreditDetail(HttpServletRequest request, Model model) throws Exception {
|
| 1050 |
List<CreditAccount> creditAccounts = creditAccountRepository.selectAll();
|
1049 |
List<CreditAccount> creditAccounts = creditAccountRepository.selectAll();
|
| 1051 |
Map<Integer, CustomRetailer> customRetailers = retailerService.getAllFofoRetailers();
|
1050 |
Map<Integer, CustomRetailer> customRetailers = retailerService.getAllFofoRetailers();
|
| 1052 |
|
1051 |
|
| - |
|
1052 |
Map<Integer, FofoStore> fofoStoreMap = fofoStoreRepository
|
| - |
|
1053 |
.selectByRetailerIds(new ArrayList<>(customRetailers.keySet())).stream()
|
| - |
|
1054 |
.collect(Collectors.toMap(x -> x.getId(), x -> x));
|
| - |
|
1055 |
|
| 1053 |
model.addAttribute("creditAccounts", creditAccounts);
|
1056 |
model.addAttribute("creditAccounts", creditAccounts);
|
| - |
|
1057 |
model.addAttribute("fofoStoreMap", fofoStoreMap);
|
| 1054 |
model.addAttribute("customRetailers", customRetailers);
|
1058 |
model.addAttribute("customRetailers", customRetailers);
|
| 1055 |
return "partner-credit-detail";
|
1059 |
return "partner-credit-detail";
|
| 1056 |
}
|
1060 |
}
|
| 1057 |
|
1061 |
|
| 1058 |
@RequestMapping(value = "/activateKred", method = RequestMethod.POST)
|
1062 |
@RequestMapping(value = "/activateKred", method = RequestMethod.POST)
|