| Line 1... |
Line 1... |
| 1 |
package com.spice.profitmandi.web.controller;
|
1 |
package com.spice.profitmandi.web.controller;
|
| 2 |
|
2 |
|
| - |
|
3 |
import java.time.LocalDate;
|
| 3 |
import java.time.LocalDateTime;
|
4 |
import java.time.LocalDateTime;
|
| 4 |
import java.time.temporal.ChronoUnit;
|
5 |
import java.time.temporal.ChronoUnit;
|
| 5 |
import java.util.ArrayList;
|
6 |
import java.util.ArrayList;
|
| 6 |
import java.util.Arrays;
|
7 |
import java.util.Arrays;
|
| 7 |
import java.util.HashMap;
|
8 |
import java.util.HashMap;
|
| 8 |
import java.util.List;
|
9 |
import java.util.List;
|
| 9 |
import java.util.Map;
|
10 |
import java.util.Map;
|
| - |
|
11 |
import java.util.stream.Collectors;
|
| 10 |
|
12 |
|
| 11 |
import javax.servlet.http.HttpServletRequest;
|
13 |
import javax.servlet.http.HttpServletRequest;
|
| 12 |
|
14 |
|
| 13 |
import org.apache.logging.log4j.LogManager;
|
15 |
import org.apache.logging.log4j.LogManager;
|
| 14 |
import org.apache.logging.log4j.Logger;
|
16 |
import org.apache.logging.log4j.Logger;
|
| Line 23... |
Line 25... |
| 23 |
|
25 |
|
| 24 |
import com.spice.profitmandi.common.enumuration.RechargeStatus;
|
26 |
import com.spice.profitmandi.common.enumuration.RechargeStatus;
|
| 25 |
import com.spice.profitmandi.common.enumuration.SchemeType;
|
27 |
import com.spice.profitmandi.common.enumuration.SchemeType;
|
| 26 |
import com.spice.profitmandi.common.model.RechargeCredential;
|
28 |
import com.spice.profitmandi.common.model.RechargeCredential;
|
| 27 |
import com.spice.profitmandi.common.web.client.RestClient;
|
29 |
import com.spice.profitmandi.common.web.client.RestClient;
|
| - |
|
30 |
import com.spice.profitmandi.dao.entity.dtr.DailyRecharge;
|
| - |
|
31 |
import com.spice.profitmandi.dao.entity.dtr.RechargeProvider;
|
| - |
|
32 |
import com.spice.profitmandi.dao.entity.dtr.RechargeProviderCreditWalletHistory;
|
| 28 |
import com.spice.profitmandi.dao.entity.dtr.RechargeTransaction;
|
33 |
import com.spice.profitmandi.dao.entity.dtr.RechargeTransaction;
|
| 29 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrder;
|
34 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrder;
|
| 30 |
import com.spice.profitmandi.dao.entity.fofo.Purchase;
|
35 |
import com.spice.profitmandi.dao.entity.fofo.Purchase;
|
| - |
|
36 |
import com.spice.profitmandi.dao.repository.dtr.DailyRechargeRepository;
|
| - |
|
37 |
import com.spice.profitmandi.dao.repository.dtr.RechargeProviderCreditWalletHistoryRepository;
|
| - |
|
38 |
import com.spice.profitmandi.dao.repository.dtr.RechargeProviderRepository;
|
| 31 |
import com.spice.profitmandi.dao.repository.dtr.RechargeTransactionRepository;
|
39 |
import com.spice.profitmandi.dao.repository.dtr.RechargeTransactionRepository;
|
| 32 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderRepository;
|
40 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderRepository;
|
| 33 |
import com.spice.profitmandi.dao.repository.fofo.PurchaseRepository;
|
41 |
import com.spice.profitmandi.dao.repository.fofo.PurchaseRepository;
|
| 34 |
import com.spice.profitmandi.service.recharge.provider.OxigenRechargeProviderService;
|
42 |
import com.spice.profitmandi.service.recharge.provider.OxigenRechargeProviderService;
|
| 35 |
import com.spice.profitmandi.service.recharge.provider.ThinkWalnutDigitalRechargeProviderService;
|
43 |
import com.spice.profitmandi.service.recharge.provider.ThinkWalnutDigitalRechargeProviderService;
|
| 36 |
import com.spice.profitmandi.service.scheme.SchemeService;
|
44 |
import com.spice.profitmandi.service.scheme.SchemeService;
|
| 37 |
import com.spice.profitmandi.web.util.MVCResponseSender;
|
45 |
import com.spice.profitmandi.web.util.MVCResponseSender;
|
| 38 |
|
46 |
|
| 39 |
@Controller
|
47 |
@Controller
|
| 40 |
@Transactional(rollbackFor=Throwable.class)
|
48 |
@Transactional(rollbackFor = Throwable.class)
|
| 41 |
public class CronController {
|
49 |
public class CronController {
|
| 42 |
|
50 |
|
| 43 |
@Value("${oxigen.recharge.transaction.url}")
|
51 |
@Value("${oxigen.recharge.transaction.url}")
|
| 44 |
private String oxigenRechargeTransactionUrl;
|
52 |
private String oxigenRechargeTransactionUrl;
|
| 45 |
|
53 |
|
| 46 |
@Value("${oxigen.recharge.enquiry.url}")
|
54 |
@Value("${oxigen.recharge.enquiry.url}")
|
| 47 |
private String oxigenRechargeEnquiryUrl;
|
55 |
private String oxigenRechargeEnquiryUrl;
|
| 48 |
|
56 |
|
| 49 |
@Value("${oxigen.recharge.auth.key}")
|
57 |
@Value("${oxigen.recharge.auth.key}")
|
| 50 |
private String oxigenRechargeAuthKey;
|
58 |
private String oxigenRechargeAuthKey;
|
| 51 |
|
59 |
|
| 52 |
@Value("${oxigen.recharge.validation.url}")
|
60 |
@Value("${oxigen.recharge.validation.url}")
|
| 53 |
private String oxigenRechargeValidationUrl;
|
61 |
private String oxigenRechargeValidationUrl;
|
| 54 |
|
62 |
|
| 55 |
@Value("${oxigen.recharge.validation.auth.key}")
|
63 |
@Value("${oxigen.recharge.validation.auth.key}")
|
| 56 |
private String oxigenRechargeValidationAuthKey;
|
64 |
private String oxigenRechargeValidationAuthKey;
|
| 57 |
|
65 |
|
| 58 |
@Value("${think.walnut.digital.recharge.transaction.mobile.url}")
|
66 |
@Value("${think.walnut.digital.recharge.transaction.mobile.url}")
|
| 59 |
private String thinkWalnutDigitalRechargeTransactionMobileUrl;
|
67 |
private String thinkWalnutDigitalRechargeTransactionMobileUrl;
|
| 60 |
|
68 |
|
| 61 |
@Value("${think.walnut.digital.recharge.transaction.dth.url}")
|
69 |
@Value("${think.walnut.digital.recharge.transaction.dth.url}")
|
| 62 |
private String thinkWalnutDigitalRechargeTransactionDthUrl;
|
70 |
private String thinkWalnutDigitalRechargeTransactionDthUrl;
|
| 63 |
|
71 |
|
| 64 |
@Value("${think.walnut.digital.recharge.enquiry.url}")
|
72 |
@Value("${think.walnut.digital.recharge.enquiry.url}")
|
| 65 |
private String thinkWalnutDigitalRechargeEnquiryUrl;
|
73 |
private String thinkWalnutDigitalRechargeEnquiryUrl;
|
| 66 |
|
74 |
|
| 67 |
@Value("${think.walnut.digital.recharge.balance.url}")
|
75 |
@Value("${think.walnut.digital.recharge.balance.url}")
|
| 68 |
private String thinkWalnutDigitalRechargeBalanceUrl;
|
76 |
private String thinkWalnutDigitalRechargeBalanceUrl;
|
| 69 |
|
77 |
|
| 70 |
@Value("${think.walnut.digital.recharge.username}")
|
78 |
@Value("${think.walnut.digital.recharge.username}")
|
| 71 |
private String thinkWalnutDigitalRechargeUserName;
|
79 |
private String thinkWalnutDigitalRechargeUserName;
|
| 72 |
|
80 |
|
| 73 |
@Value("${think.walnut.digital.recharge.password}")
|
81 |
@Value("${think.walnut.digital.recharge.password}")
|
| 74 |
private String thinkWalnutDigitalRechargePassword;
|
82 |
private String thinkWalnutDigitalRechargePassword;
|
| 75 |
|
83 |
|
| 76 |
@Value("${think.walnut.digital.recharge.auth.key}")
|
84 |
@Value("${think.walnut.digital.recharge.auth.key}")
|
| 77 |
private String thinkWalnutDigitalRechargeAuthKey;
|
85 |
private String thinkWalnutDigitalRechargeAuthKey;
|
| 78 |
|
86 |
|
| 79 |
@Autowired
|
87 |
@Autowired
|
| 80 |
PurchaseRepository purchaseRepository;
|
88 |
private PurchaseRepository purchaseRepository;
|
| 81 |
|
89 |
|
| 82 |
@Autowired
|
90 |
@Autowired
|
| 83 |
SchemeService schemeService;
|
91 |
private SchemeService schemeService;
|
| 84 |
|
92 |
|
| 85 |
@Autowired
|
93 |
@Autowired
|
| 86 |
RechargeTransactionRepository rechargeTransactionRepository;
|
94 |
private RechargeTransactionRepository rechargeTransactionRepository;
|
| 87 |
|
95 |
|
| 88 |
@Autowired
|
96 |
@Autowired
|
| 89 |
FofoOrderRepository fofoOrderRepository;
|
97 |
private RechargeProviderCreditWalletHistoryRepository rechargeProviderCreditWalletHistoryRepository;
|
| 90 |
|
98 |
|
| 91 |
@Autowired
|
99 |
@Autowired
|
| 92 |
ThinkWalnutDigitalRechargeProviderService thinkWalnutDigitalRechargeProviderService;
|
100 |
private FofoOrderRepository fofoOrderRepository;
|
| 93 |
|
101 |
|
| 94 |
@Autowired
|
102 |
@Autowired
|
| - |
|
103 |
private ThinkWalnutDigitalRechargeProviderService thinkWalnutDigitalRechargeProviderService;
|
| - |
|
104 |
|
| - |
|
105 |
@Autowired
|
| 95 |
OxigenRechargeProviderService oxigenRechargeProviderService;
|
106 |
private OxigenRechargeProviderService oxigenRechargeProviderService;
|
| - |
|
107 |
|
| - |
|
108 |
@Autowired
|
| - |
|
109 |
private RechargeProviderRepository rechargeProviderRepository;
|
| 96 |
|
110 |
|
| - |
|
111 |
@Autowired
|
| - |
|
112 |
private DailyRechargeRepository dailyRechargeRepository;
|
| - |
|
113 |
|
| 97 |
@Autowired
|
114 |
@Autowired
|
| 98 |
private RestClient restClient;
|
115 |
private RestClient restClient;
|
| 99 |
|
116 |
|
| 100 |
@Autowired
|
117 |
@Autowired
|
| 101 |
private MVCResponseSender mvcResponseSender;
|
118 |
private MVCResponseSender mvcResponseSender;
|
| 102 |
|
119 |
|
| 103 |
@Value("${prod}")
|
120 |
@Value("${prod}")
|
| 104 |
private boolean prod;
|
121 |
private boolean prod;
|
| 105 |
|
- |
|
| 106 |
|
122 |
|
| 107 |
private static final Logger LOGGER = LogManager.getLogger(CronController.class);
|
123 |
private static final Logger LOGGER = LogManager.getLogger(CronController.class);
|
| 108 |
|
124 |
|
| 109 |
@Scheduled(cron = "0 45 6 * * *")
|
125 |
@Scheduled(cron = "0 45 6 * * *")
|
| 110 |
public void executeJob() throws Exception {
|
126 |
public void executeJob() throws Exception {
|
| 111 |
if(prod) {
|
127 |
if (prod) {
|
| 112 |
String uri = "/cron/process-schemes";
|
128 |
String uri = "/cron/process-schemes";
|
| 113 |
restClient.get(SchemeType.HTTP, "localhost", 8080, uri, null);
|
129 |
restClient.get(SchemeType.HTTP, "localhost", 8080, uri, null);
|
| 114 |
}
|
130 |
}
|
| 115 |
}
|
131 |
}
|
| - |
|
132 |
|
| - |
|
133 |
@RequestMapping(value = "/cron/daily-generation", method = RequestMethod.GET)
|
| - |
|
134 |
public void executeDailRechargeGeneration() {
|
| - |
|
135 |
List<RechargeProviderCreditWalletHistory> allCreditHistory = rechargeProviderCreditWalletHistoryRepository
|
| - |
|
136 |
.selectAll(0, 2000);
|
| - |
|
137 |
List<RechargeProvider> rechargeProviders = rechargeProviderRepository.selectAll();
|
| - |
|
138 |
rechargeProviders.stream().forEach(x -> x.setAmount(0));
|
| - |
|
139 |
LocalDate endDate = LocalDate.now().plusDays(1);
|
| - |
|
140 |
|
| - |
|
141 |
Map<LocalDate, List<RechargeProviderCreditWalletHistory>> dateWiseProviderCreditsMap = allCreditHistory.stream()
|
| - |
|
142 |
.collect(Collectors.groupingBy(x -> x.getCreateTimestamp().toLocalDate()));
|
| - |
|
143 |
|
| - |
|
144 |
float previousDayClosing = 0;
|
| - |
|
145 |
rechargeProviders.stream().forEach(x -> {
|
| - |
|
146 |
LocalDate date = LocalDate.of(2018, 4, 6);
|
| - |
|
147 |
while (date.isBefore(endDate)) {
|
| - |
|
148 |
List<RechargeTransaction> dateWiseRechargeTransactions = rechargeTransactionRepository
|
| - |
|
149 |
.selectAllBetweenTimestamp(Arrays.asList(RechargeStatus.values()), date.atStartOfDay(),
|
| - |
|
150 |
date.plusDays(1).atStartOfDay());
|
| - |
|
151 |
DailyRecharge dailyRecharge = dailyRechargeRepository.selectByDate(date);
|
| - |
|
152 |
if (dailyRecharge == null) {
|
| - |
|
153 |
dailyRecharge = new DailyRecharge();
|
| - |
|
154 |
dailyRecharge.setCreateDate(date);
|
| - |
|
155 |
dailyRecharge.setProviderId(x.getId());
|
| - |
|
156 |
}
|
| - |
|
157 |
|
| - |
|
158 |
List<RechargeTransaction> successfulTransactions = dateWiseRechargeTransactions.stream()
|
| - |
|
159 |
.filter(y -> y.getStatus().equals(RechargeStatus.SUCCESS)).collect(Collectors.toList());
|
| - |
|
160 |
|
| - |
|
161 |
float dailyAmount = 0;
|
| - |
|
162 |
float totalCommission = 0;
|
| - |
|
163 |
for (RechargeTransaction rechargeTransaction : successfulTransactions) {
|
| - |
|
164 |
if (rechargeTransaction.getProviderId() == x.getId()) {
|
| - |
|
165 |
dailyAmount += rechargeTransaction.getAmount();
|
| - |
|
166 |
totalCommission += rechargeTransaction.getCommission();
|
| - |
|
167 |
}
|
| - |
|
168 |
}
|
| - |
|
169 |
|
| - |
|
170 |
List<RechargeProviderCreditWalletHistory> rechargeHistoryList = dateWiseProviderCreditsMap.get(date);
|
| - |
|
171 |
float dailyWalletRecharge = 0;
|
| - |
|
172 |
for (RechargeProviderCreditWalletHistory rechargeProviderCreditWalletHistory : rechargeHistoryList) {
|
| - |
|
173 |
if (rechargeProviderCreditWalletHistory.getProviderId() == x.getId()) {
|
| - |
|
174 |
dailyWalletRecharge += rechargeProviderCreditWalletHistory.getAmount();
|
| - |
|
175 |
}
|
| - |
|
176 |
}
|
| - |
|
177 |
if (dailyAmount > 0 || dailyWalletRecharge > 0) {
|
| - |
|
178 |
dailyRecharge.setOpeningBalance(previousDayClosing);
|
| - |
|
179 |
dailyRecharge.setProviderId(x.getId());
|
| - |
|
180 |
dailyRecharge.setWalletRechargeAmount(dailyWalletRecharge);
|
| - |
|
181 |
dailyRecharge.setTotalCommission(totalCommission);
|
| - |
|
182 |
float closingBalance = dailyRecharge.getOpeningBalance() + dailyWalletRecharge - dailyAmount;
|
| - |
|
183 |
dailyRecharge.setClosingBalance(closingBalance);
|
| - |
|
184 |
dailyRechargeRepository.persist(dailyRecharge);
|
| - |
|
185 |
}
|
| - |
|
186 |
date = date.plusDays(1);
|
| - |
|
187 |
}
|
| - |
|
188 |
});
|
| 116 |
|
189 |
}
|
| - |
|
190 |
|
| 117 |
@RequestMapping(value = "/cron/reconcile-recharge", method = RequestMethod.GET)
|
191 |
@RequestMapping(value = "/cron/reconcile-recharge", method = RequestMethod.GET)
|
| 118 |
public String reconcileRecharge(Model model) throws Exception {
|
192 |
public String reconcileRecharge(Model model) throws Exception {
|
| 119 |
LocalDateTime fromDate = LocalDateTime.now().truncatedTo(ChronoUnit.DAYS).minusDays(30);
|
193 |
LocalDateTime fromDate = LocalDateTime.now().truncatedTo(ChronoUnit.DAYS).minusDays(30);
|
| 120 |
LocalDateTime toDate = LocalDateTime.now().truncatedTo(ChronoUnit.DAYS);
|
194 |
LocalDateTime toDate = LocalDateTime.now().truncatedTo(ChronoUnit.DAYS);
|
| 121 |
List<RechargeStatus> nonSuccessRechargeStatuses = new ArrayList<>(Arrays.asList(RechargeStatus.values()));
|
195 |
List<RechargeStatus> nonSuccessRechargeStatuses = new ArrayList<>(Arrays.asList(RechargeStatus.values()));
|
| Line 126... |
Line 200... |
| 126 |
thinkWalnutDigitalRechargeEnquiryCredential.setRechargeUrl(thinkWalnutDigitalRechargeEnquiryUrl);
|
200 |
thinkWalnutDigitalRechargeEnquiryCredential.setRechargeUrl(thinkWalnutDigitalRechargeEnquiryUrl);
|
| 127 |
thinkWalnutDigitalRechargeEnquiryCredential.setRechargeUserName(thinkWalnutDigitalRechargeUserName);
|
201 |
thinkWalnutDigitalRechargeEnquiryCredential.setRechargeUserName(thinkWalnutDigitalRechargeUserName);
|
| 128 |
thinkWalnutDigitalRechargeEnquiryCredential.setRechargePassword(thinkWalnutDigitalRechargePassword);
|
202 |
thinkWalnutDigitalRechargeEnquiryCredential.setRechargePassword(thinkWalnutDigitalRechargePassword);
|
| 129 |
thinkWalnutDigitalRechargeEnquiryCredential.setRechargeAuthKey(thinkWalnutDigitalRechargeAuthKey);
|
203 |
thinkWalnutDigitalRechargeEnquiryCredential.setRechargeAuthKey(thinkWalnutDigitalRechargeAuthKey);
|
| 130 |
Map<String, RechargeStatus> requestRechargeStatusChanged = new HashMap<>();
|
204 |
Map<String, RechargeStatus> requestRechargeStatusChanged = new HashMap<>();
|
| 131 |
List<RechargeTransaction> rechargeTransactions = rechargeTransactionRepository.selectAllBetweenTimestamp(nonSuccessRechargeStatuses,fromDate, toDate);
|
205 |
List<RechargeTransaction> rechargeTransactions = rechargeTransactionRepository
|
| - |
|
206 |
.selectAllBetweenTimestamp(nonSuccessRechargeStatuses, fromDate, toDate);
|
| 132 |
for(RechargeTransaction rechargeTransaction : rechargeTransactions) {
|
207 |
for (RechargeTransaction rechargeTransaction : rechargeTransactions) {
|
| 133 |
try {
|
208 |
try {
|
| 134 |
int providerId = rechargeTransaction.getProviderId();
|
209 |
int providerId = rechargeTransaction.getProviderId();
|
| 135 |
if(providerId==1) {
|
210 |
if (providerId == 1) {
|
| 136 |
oxigenRechargeProviderService.doCheckStatusRequest(oxigenRechargeEnquiryUrl, oxigenRechargeAuthKey, rechargeTransaction);
|
211 |
oxigenRechargeProviderService.doCheckStatusRequest(oxigenRechargeEnquiryUrl, oxigenRechargeAuthKey,
|
| - |
|
212 |
rechargeTransaction);
|
| 137 |
} else if(providerId==2) {
|
213 |
} else if (providerId == 2) {
|
| - |
|
214 |
thinkWalnutDigitalRechargeProviderService
|
| 138 |
thinkWalnutDigitalRechargeProviderService.doCheckStatusRequest(thinkWalnutDigitalRechargeEnquiryCredential, rechargeTransaction);
|
215 |
.doCheckStatusRequest(thinkWalnutDigitalRechargeEnquiryCredential, rechargeTransaction);
|
| 139 |
}
|
216 |
}
|
| - |
|
217 |
if (rechargeTransaction.getStatus().equals(RechargeStatus.SUCCESS)
|
| 140 |
if(rechargeTransaction.getStatus().equals(RechargeStatus.SUCCESS) || rechargeTransaction.getStatus().equals(RechargeStatus.FAILED)) {
|
218 |
|| rechargeTransaction.getStatus().equals(RechargeStatus.FAILED)) {
|
| 141 |
requestRechargeStatusChanged.put(rechargeTransaction.getRequestId(), rechargeTransaction.getStatus());
|
219 |
requestRechargeStatusChanged.put(rechargeTransaction.getRequestId(),
|
| - |
|
220 |
rechargeTransaction.getStatus());
|
| 142 |
}
|
221 |
}
|
| 143 |
} catch (Exception e) {
|
222 |
} catch (Exception e) {
|
| 144 |
LOGGER.info("Could not check status for Request {}", rechargeTransaction.getRequestId());
|
223 |
LOGGER.info("Could not check status for Request {}", rechargeTransaction.getRequestId());
|
| 145 |
}
|
224 |
}
|
| 146 |
}
|
225 |
}
|
| 147 |
model.addAttribute("response", mvcResponseSender.createResponseString(requestRechargeStatusChanged));
|
226 |
model.addAttribute("response", mvcResponseSender.createResponseString(requestRechargeStatusChanged));
|
| 148 |
return "response";
|
227 |
return "response";
|
| 149 |
}
|
228 |
}
|
| 150 |
|
229 |
|
| 151 |
@RequestMapping(value = "/cron/process-schemes", method = RequestMethod.GET)
|
230 |
@RequestMapping(value = "/cron/process-schemes", method = RequestMethod.GET)
|
| 152 |
public String createScheme(HttpServletRequest request, Model model) throws Exception {
|
231 |
public String createScheme(HttpServletRequest request, Model model) throws Exception {
|
| 153 |
LocalDateTime fromDate = LocalDateTime.now().minusDays(15);
|
232 |
LocalDateTime fromDate = LocalDateTime.now().minusDays(15);
|
| 154 |
LOGGER.info("Started execution at {}", LocalDateTime.now());
|
233 |
LOGGER.info("Started execution at {}", LocalDateTime.now());
|
| 155 |
List<Purchase> purchases = purchaseRepository.selectFromPurchaseCompleteDate(fromDate);
|
234 |
List<Purchase> purchases = purchaseRepository.selectFromPurchaseCompleteDate(fromDate);
|
| Line 157... |
Line 236... |
| 157 |
try {
|
236 |
try {
|
| 158 |
schemeService.processSchemeIn(purchase.getId(), purchase.getFofoId());
|
237 |
schemeService.processSchemeIn(purchase.getId(), purchase.getFofoId());
|
| 159 |
} catch (Exception e) {
|
238 |
} catch (Exception e) {
|
| 160 |
LOGGER.error("Error while processing purchase {} for scheme In ", purchase.getId());
|
239 |
LOGGER.error("Error while processing purchase {} for scheme In ", purchase.getId());
|
| 161 |
e.printStackTrace();
|
240 |
e.printStackTrace();
|
| 162 |
|
241 |
|
| 163 |
}
|
242 |
}
|
| 164 |
}
|
243 |
}
|
| 165 |
List<FofoOrder> fofoOrders = fofoOrderRepository.selectFromSaleDate(fromDate);
|
244 |
List<FofoOrder> fofoOrders = fofoOrderRepository.selectFromSaleDate(fromDate);
|
| 166 |
for (FofoOrder fofoOrder: fofoOrders) {
|
245 |
for (FofoOrder fofoOrder : fofoOrders) {
|
| 167 |
try {
|
246 |
try {
|
| 168 |
schemeService.processSchemeOut(fofoOrder.getId(), fofoOrder.getFofoId());
|
247 |
schemeService.processSchemeOut(fofoOrder.getId(), fofoOrder.getFofoId());
|
| 169 |
} catch (Exception e) {
|
248 |
} catch (Exception e) {
|
| 170 |
LOGGER.error("Error while processing sale order {} for scheme Out", fofoOrder.getId());
|
249 |
LOGGER.error("Error while processing sale order {} for scheme Out", fofoOrder.getId());
|
| 171 |
}
|
250 |
}
|