| Line 1... |
Line 1... |
| 1 |
package com.smartdukaan.cron.scheduled;
|
1 |
package com.smartdukaan.cron.scheduled;
|
| 2 |
|
2 |
|
| 3 |
import static java.util.stream.Collectors.groupingBy;
|
- |
|
| 4 |
import static java.util.stream.Collectors.mapping;
|
- |
|
| 5 |
|
- |
|
| 6 |
import java.io.FileOutputStream;
|
- |
|
| 7 |
import java.io.IOException;
|
- |
|
| 8 |
import java.io.ObjectOutputStream;
|
- |
|
| 9 |
import java.io.Serializable;
|
- |
|
| 10 |
import java.io.UnsupportedEncodingException;
|
- |
|
| 11 |
import java.math.BigDecimal;
|
- |
|
| 12 |
import java.math.RoundingMode;
|
- |
|
| 13 |
import java.nio.file.Files;
|
- |
|
| 14 |
import java.nio.file.Paths;
|
- |
|
| 15 |
import java.sql.Timestamp;
|
- |
|
| 16 |
import java.text.DecimalFormat;
|
- |
|
| 17 |
import java.time.Duration;
|
- |
|
| 18 |
import java.time.LocalDate;
|
- |
|
| 19 |
import java.time.LocalDateTime;
|
- |
|
| 20 |
import java.time.LocalTime;
|
- |
|
| 21 |
import java.time.Month;
|
- |
|
| 22 |
import java.time.YearMonth;
|
- |
|
| 23 |
import java.time.format.DateTimeFormatter;
|
- |
|
| 24 |
import java.time.temporal.ChronoField;
|
- |
|
| 25 |
import java.time.temporal.ChronoUnit;
|
- |
|
| 26 |
import java.util.ArrayList;
|
- |
|
| 27 |
import java.util.Arrays;
|
- |
|
| 28 |
import java.util.Base64;
|
- |
|
| 29 |
import java.util.Collections;
|
- |
|
| 30 |
import java.util.Comparator;
|
- |
|
| 31 |
import java.util.HashMap;
|
- |
|
| 32 |
import java.util.HashSet;
|
- |
|
| 33 |
import java.util.LinkedHashMap;
|
- |
|
| 34 |
import java.util.List;
|
- |
|
| 35 |
import java.util.Map;
|
- |
|
| 36 |
import java.util.Map.Entry;
|
- |
|
| 37 |
import java.util.Objects;
|
- |
|
| 38 |
import java.util.Optional;
|
- |
|
| 39 |
import java.util.Set;
|
- |
|
| 40 |
import java.util.stream.Collectors;
|
- |
|
| 41 |
import java.util.stream.Stream;
|
- |
|
| 42 |
|
- |
|
| 43 |
import javax.mail.MessagingException;
|
- |
|
| 44 |
import javax.mail.internet.InternetAddress;
|
- |
|
| 45 |
import javax.mail.internet.MimeMessage;
|
- |
|
| 46 |
|
- |
|
| 47 |
import org.apache.commons.io.output.ByteArrayOutputStream;
|
- |
|
| 48 |
import org.apache.commons.lang.StringUtils;
|
- |
|
| 49 |
import org.apache.http.client.methods.CloseableHttpResponse;
|
- |
|
| 50 |
import org.apache.http.client.methods.HttpPost;
|
- |
|
| 51 |
import org.apache.http.conn.HttpHostConnectException;
|
- |
|
| 52 |
import org.apache.http.entity.StringEntity;
|
- |
|
| 53 |
import org.apache.http.impl.client.CloseableHttpClient;
|
- |
|
| 54 |
import org.apache.http.impl.client.HttpClients;
|
- |
|
| 55 |
import org.apache.logging.log4j.LogManager;
|
- |
|
| 56 |
import org.apache.logging.log4j.Logger;
|
- |
|
| 57 |
import org.json.JSONArray;
|
- |
|
| 58 |
import org.json.JSONObject;
|
- |
|
| 59 |
import org.json.XML;
|
- |
|
| 60 |
import org.springframework.beans.factory.annotation.Autowired;
|
- |
|
| 61 |
import org.springframework.beans.factory.annotation.Qualifier;
|
- |
|
| 62 |
import org.springframework.beans.factory.annotation.Value;
|
- |
|
| 63 |
import org.springframework.core.io.ByteArrayResource;
|
- |
|
| 64 |
import org.springframework.core.io.InputStreamSource;
|
- |
|
| 65 |
import org.springframework.mail.javamail.JavaMailSender;
|
- |
|
| 66 |
import org.springframework.mail.javamail.MimeMessageHelper;
|
- |
|
| 67 |
import org.springframework.stereotype.Component;
|
- |
|
| 68 |
import org.springframework.transaction.annotation.Transactional;
|
- |
|
| 69 |
|
- |
|
| 70 |
import com.google.common.collect.Lists;
|
3 |
import com.google.common.collect.Lists;
|
| 71 |
import com.google.gson.Gson;
|
4 |
import com.google.gson.Gson;
|
| 72 |
import com.razorpay.Payment;
|
5 |
import com.razorpay.Payment;
|
| 73 |
import com.smartdukaan.cron.itelImeiActivation.ItelImeiActivationService;
|
6 |
import com.smartdukaan.cron.itelImeiActivation.ItelImeiActivationService;
|
| 74 |
import com.smartdukaan.cron.itelImeiActivation.TecnoImeiActivation;
|
7 |
import com.smartdukaan.cron.itelImeiActivation.TecnoImeiActivation;
|
| 75 |
import com.spice.profitmandi.common.enumuration.ActivationType;
|
8 |
import com.spice.profitmandi.common.enumuration.ActivationType;
|
| 76 |
import com.spice.profitmandi.common.enumuration.MessageType;
|
9 |
import com.spice.profitmandi.common.enumuration.MessageType;
|
| 77 |
import com.spice.profitmandi.common.enumuration.RechargeStatus;
|
10 |
import com.spice.profitmandi.common.enumuration.RechargeStatus;
|
| 78 |
import com.spice.profitmandi.common.enumuration.ReporticoProject;
|
11 |
import com.spice.profitmandi.common.enumuration.ReporticoProject;
|
| 79 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
12 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 80 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
- |
|
| 81 |
import com.spice.profitmandi.common.model.FocusedModelShortageModel;
|
- |
|
| 82 |
import com.spice.profitmandi.common.model.GstRate;
|
13 |
import com.spice.profitmandi.common.model.*;
|
| 83 |
import com.spice.profitmandi.common.model.InvoicePdfModel;
|
- |
|
| 84 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
- |
|
| 85 |
import com.spice.profitmandi.common.model.RechargeCredential;
|
- |
|
| 86 |
import com.spice.profitmandi.common.model.SendNotificationModel;
|
- |
|
| 87 |
import com.spice.profitmandi.common.services.ReporticoService;
|
14 |
import com.spice.profitmandi.common.services.ReporticoService;
|
| 88 |
import com.spice.profitmandi.common.services.mandii.AccountStatusResponseOut;
|
15 |
import com.spice.profitmandi.common.services.mandii.AccountStatusResponseOut;
|
| 89 |
import com.spice.profitmandi.common.services.mandii.EligibilityStatusEnum;
|
16 |
import com.spice.profitmandi.common.services.mandii.EligibilityStatusEnum;
|
| 90 |
import com.spice.profitmandi.common.services.mandii.MandiiService;
|
17 |
import com.spice.profitmandi.common.services.mandii.MandiiService;
|
| 91 |
import com.spice.profitmandi.common.util.FileUtil;
|
18 |
import com.spice.profitmandi.common.util.FileUtil;
|
| Line 101... |
Line 28... |
| 101 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
28 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
| 102 |
import com.spice.profitmandi.dao.entity.catalog.Scheme;
|
29 |
import com.spice.profitmandi.dao.entity.catalog.Scheme;
|
| 103 |
import com.spice.profitmandi.dao.entity.catalog.TagListing;
|
30 |
import com.spice.profitmandi.dao.entity.catalog.TagListing;
|
| 104 |
import com.spice.profitmandi.dao.entity.cs.Position;
|
31 |
import com.spice.profitmandi.dao.entity.cs.Position;
|
| 105 |
import com.spice.profitmandi.dao.entity.cs.Ticket;
|
32 |
import com.spice.profitmandi.dao.entity.cs.Ticket;
|
| 106 |
import com.spice.profitmandi.dao.entity.dtr.CreditAccount;
|
- |
|
| 107 |
import com.spice.profitmandi.dao.entity.dtr.CreditStatus;
|
- |
|
| 108 |
import com.spice.profitmandi.dao.entity.dtr.DailyRecharge;
|
- |
|
| 109 |
import com.spice.profitmandi.dao.entity.dtr.EmployeeAttendance;
|
- |
|
| 110 |
import com.spice.profitmandi.dao.entity.dtr.InsurancePolicy;
|
- |
|
| 111 |
import com.spice.profitmandi.dao.entity.dtr.NotificationCampaign;
|
- |
|
| 112 |
import com.spice.profitmandi.dao.entity.dtr.PushNotifications;
|
- |
|
| 113 |
import com.spice.profitmandi.dao.entity.dtr.RechargeProvider;
|
- |
|
| 114 |
import com.spice.profitmandi.dao.entity.dtr.RechargeProviderCreditWalletHistory;
|
- |
|
| 115 |
import com.spice.profitmandi.dao.entity.dtr.RechargeTransaction;
|
- |
|
| 116 |
import com.spice.profitmandi.dao.entity.dtr.RetailerBlockBrands;
|
- |
|
| 117 |
import com.spice.profitmandi.dao.entity.dtr.User;
|
33 |
import com.spice.profitmandi.dao.entity.dtr.User;
|
| 118 |
import com.spice.profitmandi.dao.entity.fofo.ActivityType;
|
- |
|
| 119 |
import com.spice.profitmandi.dao.entity.fofo.CurrentPartnerDailyInvestment;
|
- |
|
| 120 |
import com.spice.profitmandi.dao.entity.fofo.Customer;
|
34 |
import com.spice.profitmandi.dao.entity.dtr.*;
|
| 121 |
import com.spice.profitmandi.dao.entity.fofo.CustomerAddress;
|
- |
|
| 122 |
import com.spice.profitmandi.dao.entity.fofo.FofoLineItem;
|
- |
|
| 123 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrder;
|
- |
|
| 124 |
import com.spice.profitmandi.dao.entity.fofo.FofoOrderItem;
|
- |
|
| 125 |
import com.spice.profitmandi.dao.entity.fofo.FofoPayment;
|
- |
|
| 126 |
import com.spice.profitmandi.dao.entity.fofo.FofoStore;
|
- |
|
| 127 |
import com.spice.profitmandi.dao.entity.fofo.HygieneData;
|
- |
|
| 128 |
import com.spice.profitmandi.dao.entity.fofo.InventoryItem;
|
- |
|
| 129 |
import com.spice.profitmandi.dao.entity.fofo.MonthlyTarget;
|
- |
|
| 130 |
import com.spice.profitmandi.dao.entity.fofo.PartnerDailyInvestment;
|
- |
|
| 131 |
import com.spice.profitmandi.dao.entity.fofo.PartnerProblem;
|
- |
|
| 132 |
import com.spice.profitmandi.dao.entity.fofo.PartnerType;
|
- |
|
| 133 |
import com.spice.profitmandi.dao.entity.fofo.PendingOrder;
|
- |
|
| 134 |
import com.spice.profitmandi.dao.entity.fofo.PendingOrderItem;
|
- |
|
| 135 |
import com.spice.profitmandi.dao.entity.fofo.Purchase;
|
35 |
import com.spice.profitmandi.dao.entity.fofo.*;
|
| 136 |
import com.spice.profitmandi.dao.entity.fofo.RazorPay;
|
- |
|
| 137 |
import com.spice.profitmandi.dao.entity.fofo.ScanRecord;
|
- |
|
| 138 |
import com.spice.profitmandi.dao.entity.fofo.SchemeInOut;
|
- |
|
| 139 |
import com.spice.profitmandi.dao.entity.inventory.PartnerAgeingModel;
|
36 |
import com.spice.profitmandi.dao.entity.inventory.PartnerAgeingModel;
|
| 140 |
import com.spice.profitmandi.dao.entity.inventory.ReporticoCacheTable;
|
37 |
import com.spice.profitmandi.dao.entity.inventory.ReporticoCacheTable;
|
| 141 |
import com.spice.profitmandi.dao.entity.inventory.SaholicCIS;
|
38 |
import com.spice.profitmandi.dao.entity.inventory.SaholicCIS;
|
| 142 |
import com.spice.profitmandi.dao.entity.inventory.SaholicPOItem;
|
39 |
import com.spice.profitmandi.dao.entity.inventory.SaholicPOItem;
|
| 143 |
import com.spice.profitmandi.dao.entity.inventory.VendorCatalogPricing;
|
- |
|
| 144 |
import com.spice.profitmandi.dao.entity.inventory.VendorCatalogPricingLog;
|
40 |
import com.spice.profitmandi.dao.entity.inventory.VendorCatalogPricingLog;
|
| 145 |
import com.spice.profitmandi.dao.entity.inventory.VendorItemPricing;
|
41 |
import com.spice.profitmandi.dao.entity.inventory.VendorItemPricing;
|
| 146 |
import com.spice.profitmandi.dao.entity.transaction.Loan;
|
42 |
import com.spice.profitmandi.dao.entity.transaction.*;
|
| 147 |
import com.spice.profitmandi.dao.entity.transaction.LoanStatement;
|
- |
|
| 148 |
import com.spice.profitmandi.dao.entity.transaction.Order;
|
- |
|
| 149 |
import com.spice.profitmandi.dao.entity.transaction.PriceDrop;
|
- |
|
| 150 |
import com.spice.profitmandi.dao.entity.transaction.PriceDropIMEI;
|
- |
|
| 151 |
import com.spice.profitmandi.dao.entity.transaction.SDCreditRequirement;
|
- |
|
| 152 |
import com.spice.profitmandi.dao.entity.transaction.SanctionRequest;
|
- |
|
| 153 |
import com.spice.profitmandi.dao.entity.transaction.UserWallet;
|
- |
|
| 154 |
import com.spice.profitmandi.dao.entity.transaction.UserWalletHistory;
|
- |
|
| 155 |
import com.spice.profitmandi.dao.entity.user.Address;
|
- |
|
| 156 |
import com.spice.profitmandi.dao.entity.user.Device;
|
- |
|
| 157 |
import com.spice.profitmandi.dao.entity.user.FranchiseeVisit;
|
- |
|
| 158 |
import com.spice.profitmandi.dao.entity.user.Lead;
|
43 |
import com.spice.profitmandi.dao.entity.user.*;
|
| 159 |
import com.spice.profitmandi.dao.entity.user.Refferal;
|
- |
|
| 160 |
import com.spice.profitmandi.dao.enumuration.auth.CollectionRemark;
|
44 |
import com.spice.profitmandi.dao.enumuration.auth.CollectionRemark;
|
| 161 |
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
|
45 |
import com.spice.profitmandi.dao.enumuration.catalog.SchemeType;
|
| 162 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
46 |
import com.spice.profitmandi.dao.enumuration.cs.EscalationType;
|
| 163 |
import com.spice.profitmandi.dao.enumuration.dtr.RefferalStatus;
|
47 |
import com.spice.profitmandi.dao.enumuration.dtr.RefferalStatus;
|
| 164 |
import com.spice.profitmandi.dao.enumuration.fofo.Gateway;
|
48 |
import com.spice.profitmandi.dao.enumuration.fofo.Gateway;
|
| Line 166... |
Line 50... |
| 166 |
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
|
50 |
import com.spice.profitmandi.dao.enumuration.fofo.ScanType;
|
| 167 |
import com.spice.profitmandi.dao.enumuration.inventory.VendorCatalogPricingStatus;
|
51 |
import com.spice.profitmandi.dao.enumuration.inventory.VendorCatalogPricingStatus;
|
| 168 |
import com.spice.profitmandi.dao.enumuration.transaction.CreditRisk;
|
52 |
import com.spice.profitmandi.dao.enumuration.transaction.CreditRisk;
|
| 169 |
import com.spice.profitmandi.dao.enumuration.transaction.LoanReferenceType;
|
53 |
import com.spice.profitmandi.dao.enumuration.transaction.LoanReferenceType;
|
| 170 |
import com.spice.profitmandi.dao.enumuration.transaction.PriceDropImeiStatus;
|
54 |
import com.spice.profitmandi.dao.enumuration.transaction.PriceDropImeiStatus;
|
| 171 |
import com.spice.profitmandi.dao.model.PartnerDetailModel;
|
- |
|
| 172 |
import com.spice.profitmandi.dao.model.RetailerFilterModel;
|
- |
|
| 173 |
import com.spice.profitmandi.dao.model.RetailerPeformanceFilterModel;
|
- |
|
| 174 |
import com.spice.profitmandi.dao.model.SimpleCampaign;
|
55 |
import com.spice.profitmandi.dao.model.*;
|
| 175 |
import com.spice.profitmandi.dao.model.SimpleCampaignParams;
|
- |
|
| 176 |
import com.spice.profitmandi.dao.model.VendorCatalogPricingModel;
|
- |
|
| 177 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
56 |
import com.spice.profitmandi.dao.repository.auth.AuthRepository;
|
| 178 |
import com.spice.profitmandi.dao.repository.auth.PartnerCollectionRemarkRepository;
|
57 |
import com.spice.profitmandi.dao.repository.auth.PartnerCollectionRemarkRepository;
|
| 179 |
import com.spice.profitmandi.dao.repository.catalog.CustomerOfferItemRepository;
|
- |
|
| 180 |
import com.spice.profitmandi.dao.repository.catalog.CustomerOfferRepository;
|
- |
|
| 181 |
import com.spice.profitmandi.dao.repository.catalog.DeviceRepository;
|
- |
|
| 182 |
import com.spice.profitmandi.dao.repository.catalog.FocusedModelRepository;
|
- |
|
| 183 |
import com.spice.profitmandi.dao.repository.catalog.ItemRepository;
|
58 |
import com.spice.profitmandi.dao.repository.catalog.*;
|
| 184 |
import com.spice.profitmandi.dao.repository.catalog.SchemeRepository;
|
- |
|
| 185 |
import com.spice.profitmandi.dao.repository.catalog.StateGstRateRepository;
|
- |
|
| 186 |
import com.spice.profitmandi.dao.repository.catalog.TagListingRepository;
|
- |
|
| 187 |
import com.spice.profitmandi.dao.repository.cs.CsService;
|
59 |
import com.spice.profitmandi.dao.repository.cs.*;
|
| 188 |
import com.spice.profitmandi.dao.repository.cs.PartnerRegionRepository;
|
- |
|
| 189 |
import com.spice.profitmandi.dao.repository.cs.PositionRepository;
|
- |
|
| 190 |
import com.spice.profitmandi.dao.repository.cs.RegionRepository;
|
- |
|
| 191 |
import com.spice.profitmandi.dao.repository.cs.TicketRepository;
|
- |
|
| 192 |
import com.spice.profitmandi.dao.repository.dtr.CreditAccountRepository;
|
- |
|
| 193 |
import com.spice.profitmandi.dao.repository.dtr.DailyRechargeRepository;
|
- |
|
| 194 |
import com.spice.profitmandi.dao.repository.dtr.EmployeeAttendanceRepository;
|
- |
|
| 195 |
import com.spice.profitmandi.dao.repository.dtr.FofoStoreRepository;
|
- |
|
| 196 |
import com.spice.profitmandi.dao.repository.dtr.FranchiseeActivityRepository;
|
- |
|
| 197 |
import com.spice.profitmandi.dao.repository.dtr.FranchiseeVisitRepository;
|
- |
|
| 198 |
import com.spice.profitmandi.dao.repository.dtr.InsurancePolicyRepository;
|
- |
|
| 199 |
import com.spice.profitmandi.dao.repository.dtr.LeadRepository;
|
- |
|
| 200 |
import com.spice.profitmandi.dao.repository.dtr.Mongo;
|
60 |
import com.spice.profitmandi.dao.repository.dtr.*;
|
| 201 |
import com.spice.profitmandi.dao.repository.dtr.NotificationCampaignRepository;
|
- |
|
| 202 |
import com.spice.profitmandi.dao.repository.dtr.PartnerProblemRepository;
|
- |
|
| 203 |
import com.spice.profitmandi.dao.repository.dtr.PushNotificationRepository;
|
- |
|
| 204 |
import com.spice.profitmandi.dao.repository.dtr.RechargeProviderCreditWalletHistoryRepository;
|
- |
|
| 205 |
import com.spice.profitmandi.dao.repository.dtr.RechargeProviderRepository;
|
- |
|
| 206 |
import com.spice.profitmandi.dao.repository.dtr.RechargeTransactionRepository;
|
- |
|
| 207 |
import com.spice.profitmandi.dao.repository.dtr.RefferalRepository;
|
- |
|
| 208 |
import com.spice.profitmandi.dao.repository.dtr.RetailerBlockBrandsRepository;
|
- |
|
| 209 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRegisteredAddressRepository;
|
- |
|
| 210 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
- |
|
| 211 |
import com.spice.profitmandi.dao.repository.dtr.UserCampaignRepository;
|
- |
|
| 212 |
import com.spice.profitmandi.dao.repository.fofo.ActivatedImeiRepository;
|
- |
|
| 213 |
import com.spice.profitmandi.dao.repository.fofo.CurrentInventorySnapshotRepository;
|
- |
|
| 214 |
import com.spice.profitmandi.dao.repository.fofo.CurrentPartnerDailyInvestmentRepository;
|
- |
|
| 215 |
import com.spice.profitmandi.dao.repository.fofo.CustomerAddressRepository;
|
- |
|
| 216 |
import com.spice.profitmandi.dao.repository.fofo.CustomerRepository;
|
- |
|
| 217 |
import com.spice.profitmandi.dao.repository.fofo.FofoLineItemRepository;
|
- |
|
| 218 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderItemRepository;
|
- |
|
| 219 |
import com.spice.profitmandi.dao.repository.fofo.FofoOrderRepository;
|
- |
|
| 220 |
import com.spice.profitmandi.dao.repository.fofo.FofoPaymentRepository;
|
- |
|
| 221 |
import com.spice.profitmandi.dao.repository.fofo.HygieneDataRepository;
|
- |
|
| 222 |
import com.spice.profitmandi.dao.repository.fofo.InventoryItemRepository;
|
- |
|
| 223 |
import com.spice.profitmandi.dao.repository.fofo.MonthlyTargetRepository;
|
- |
|
| 224 |
import com.spice.profitmandi.dao.repository.fofo.PartnerDailyInvestmentRepository;
|
- |
|
| 225 |
import com.spice.profitmandi.dao.repository.fofo.PartnerTargetRepository;
|
- |
|
| 226 |
import com.spice.profitmandi.dao.repository.fofo.PartnerTypeChangeRepository;
|
- |
|
| 227 |
import com.spice.profitmandi.dao.repository.fofo.PartnerTypeChangeService;
|
- |
|
| 228 |
import com.spice.profitmandi.dao.repository.fofo.PendingOrderItemRepository;
|
- |
|
| 229 |
import com.spice.profitmandi.dao.repository.fofo.PendingOrderRepository;
|
- |
|
| 230 |
import com.spice.profitmandi.dao.repository.fofo.PendingOrderService;
|
- |
|
| 231 |
import com.spice.profitmandi.dao.repository.fofo.PurchaseRepository;
|
- |
|
| 232 |
import com.spice.profitmandi.dao.repository.fofo.PurchaseReturnItemRepository;
|
- |
|
| 233 |
import com.spice.profitmandi.dao.repository.fofo.RazorPayRepository;
|
61 |
import com.spice.profitmandi.dao.repository.fofo.*;
|
| 234 |
import com.spice.profitmandi.dao.repository.fofo.ScanRecordRepository;
|
- |
|
| 235 |
import com.spice.profitmandi.dao.repository.fofo.SchemeInOutRepository;
|
- |
|
| 236 |
import com.spice.profitmandi.dao.repository.fofo.SchemeItemRepository;
|
- |
|
| 237 |
import com.spice.profitmandi.dao.repository.fofo.ServiceConfigRepository;
|
- |
|
| 238 |
import com.spice.profitmandi.dao.repository.inventory.BrandAgeingLimitRepository;
|
62 |
import com.spice.profitmandi.dao.repository.inventory.BrandAgeingLimitRepository;
|
| 239 |
import com.spice.profitmandi.dao.repository.inventory.ReporticoCacheTableRepository;
|
63 |
import com.spice.profitmandi.dao.repository.inventory.ReporticoCacheTableRepository;
|
| 240 |
import com.spice.profitmandi.dao.repository.inventory.StateRepository;
|
64 |
import com.spice.profitmandi.dao.repository.inventory.StateRepository;
|
| 241 |
import com.spice.profitmandi.dao.repository.inventory.VendorCatalogPricingLogRepository;
|
65 |
import com.spice.profitmandi.dao.repository.inventory.VendorCatalogPricingLogRepository;
|
| 242 |
import com.spice.profitmandi.dao.repository.inventory.VendorCatalogPricingRepository;
|
- |
|
| 243 |
import com.spice.profitmandi.dao.repository.inventory.VendorItemPricingRepository;
|
66 |
import com.spice.profitmandi.dao.repository.inventory.VendorItemPricingRepository;
|
| 244 |
import com.spice.profitmandi.dao.repository.inventory.WarehouseRepository;
|
67 |
import com.spice.profitmandi.dao.repository.inventory.WarehouseRepository;
|
| 245 |
import com.spice.profitmandi.dao.repository.transaction.HdfcPaymentRepository;
|
- |
|
| 246 |
import com.spice.profitmandi.dao.repository.transaction.LineItemRepository;
|
- |
|
| 247 |
import com.spice.profitmandi.dao.repository.transaction.LoanRepository;
|
68 |
import com.spice.profitmandi.dao.repository.transaction.*;
|
| 248 |
import com.spice.profitmandi.dao.repository.transaction.LoanStatementRepository;
|
- |
|
| 249 |
import com.spice.profitmandi.dao.repository.transaction.OrderRepository;
|
- |
|
| 250 |
import com.spice.profitmandi.dao.repository.transaction.PriceDropIMEIRepository;
|
- |
|
| 251 |
import com.spice.profitmandi.dao.repository.transaction.PriceDropRepository;
|
- |
|
| 252 |
import com.spice.profitmandi.dao.repository.transaction.SDCreditRequirementRepository;
|
- |
|
| 253 |
import com.spice.profitmandi.dao.repository.transaction.SanctionRequestRepository;
|
- |
|
| 254 |
import com.spice.profitmandi.dao.repository.transaction.TransactionRepository;
|
- |
|
| 255 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletHistoryRepository;
|
- |
|
| 256 |
import com.spice.profitmandi.dao.repository.transaction.UserWalletRepository;
|
- |
|
| 257 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
69 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
| 258 |
import com.spice.profitmandi.dao.repository.user.UserRepository;
|
70 |
import com.spice.profitmandi.dao.repository.user.UserRepository;
|
| 259 |
import com.spice.profitmandi.dao.repository.warehouse.BilledImeiModel;
|
71 |
import com.spice.profitmandi.dao.repository.warehouse.BilledImeiModel;
|
| 260 |
import com.spice.profitmandi.dao.repository.warehouse.BrandRegionMappingRepository;
|
72 |
import com.spice.profitmandi.dao.repository.warehouse.BrandRegionMappingRepository;
|
| 261 |
import com.spice.profitmandi.dao.repository.warehouse.WarehouseInventoryItemRepository;
|
73 |
import com.spice.profitmandi.dao.repository.warehouse.WarehouseInventoryItemRepository;
|
| Line 283... |
Line 95... |
| 283 |
import com.spice.profitmandi.service.transaction.CreditNoteService;
|
95 |
import com.spice.profitmandi.service.transaction.CreditNoteService;
|
| 284 |
import com.spice.profitmandi.service.transaction.SDCreditService;
|
96 |
import com.spice.profitmandi.service.transaction.SDCreditService;
|
| 285 |
import com.spice.profitmandi.service.transaction.TransactionService;
|
97 |
import com.spice.profitmandi.service.transaction.TransactionService;
|
| 286 |
import com.spice.profitmandi.service.user.RetailerService;
|
98 |
import com.spice.profitmandi.service.user.RetailerService;
|
| 287 |
import com.spice.profitmandi.service.wallet.WalletService;
|
99 |
import com.spice.profitmandi.service.wallet.WalletService;
|
| 288 |
|
- |
|
| 289 |
import in.shop2020.model.v1.order.OrderStatus;
|
100 |
import in.shop2020.model.v1.order.OrderStatus;
|
| 290 |
import in.shop2020.model.v1.order.WalletReferenceType;
|
101 |
import in.shop2020.model.v1.order.WalletReferenceType;
|
| 291 |
import okhttp3.OkHttpClient;
|
102 |
import okhttp3.OkHttpClient;
|
| 292 |
import okhttp3.Request;
|
103 |
import okhttp3.Request;
|
| 293 |
import okhttp3.Response;
|
104 |
import okhttp3.Response;
|
| - |
|
105 |
import org.apache.commons.io.output.ByteArrayOutputStream;
|
| - |
|
106 |
import org.apache.commons.lang.StringUtils;
|
| - |
|
107 |
import org.apache.http.client.methods.CloseableHttpResponse;
|
| - |
|
108 |
import org.apache.http.client.methods.HttpPost;
|
| - |
|
109 |
import org.apache.http.conn.HttpHostConnectException;
|
| - |
|
110 |
import org.apache.http.entity.StringEntity;
|
| - |
|
111 |
import org.apache.http.impl.client.CloseableHttpClient;
|
| - |
|
112 |
import org.apache.http.impl.client.HttpClients;
|
| - |
|
113 |
import org.apache.logging.log4j.LogManager;
|
| - |
|
114 |
import org.apache.logging.log4j.Logger;
|
| - |
|
115 |
import org.json.JSONArray;
|
| - |
|
116 |
import org.json.JSONObject;
|
| - |
|
117 |
import org.json.XML;
|
| - |
|
118 |
import org.springframework.beans.factory.annotation.Autowired;
|
| - |
|
119 |
import org.springframework.beans.factory.annotation.Qualifier;
|
| - |
|
120 |
import org.springframework.beans.factory.annotation.Value;
|
| - |
|
121 |
import org.springframework.core.io.ByteArrayResource;
|
| - |
|
122 |
import org.springframework.core.io.InputStreamSource;
|
| - |
|
123 |
import org.springframework.mail.javamail.JavaMailSender;
|
| - |
|
124 |
import org.springframework.mail.javamail.MimeMessageHelper;
|
| - |
|
125 |
import org.springframework.stereotype.Component;
|
| - |
|
126 |
import org.springframework.transaction.annotation.Transactional;
|
| - |
|
127 |
|
| - |
|
128 |
import javax.mail.MessagingException;
|
| - |
|
129 |
import javax.mail.internet.InternetAddress;
|
| - |
|
130 |
import javax.mail.internet.MimeMessage;
|
| - |
|
131 |
import java.io.*;
|
| - |
|
132 |
import java.math.BigDecimal;
|
| - |
|
133 |
import java.math.RoundingMode;
|
| - |
|
134 |
import java.nio.file.Files;
|
| - |
|
135 |
import java.nio.file.Paths;
|
| - |
|
136 |
import java.sql.Timestamp;
|
| - |
|
137 |
import java.text.DecimalFormat;
|
| - |
|
138 |
import java.time.*;
|
| - |
|
139 |
import java.time.format.DateTimeFormatter;
|
| - |
|
140 |
import java.time.temporal.ChronoField;
|
| - |
|
141 |
import java.time.temporal.ChronoUnit;
|
| - |
|
142 |
import java.util.*;
|
| - |
|
143 |
import java.util.Map.Entry;
|
| - |
|
144 |
import java.util.stream.Collectors;
|
| - |
|
145 |
import java.util.stream.Stream;
|
| - |
|
146 |
|
| - |
|
147 |
import static java.util.stream.Collectors.groupingBy;
|
| - |
|
148 |
import static java.util.stream.Collectors.mapping;
|
| 294 |
|
149 |
|
| 295 |
|
150 |
|
| 296 |
@Component
|
151 |
@Component
|
| 297 |
@Transactional(rollbackFor = Throwable.class)
|
152 |
@Transactional(rollbackFor = Throwable.class)
|
| 298 |
public class ScheduledTasks {
|
153 |
public class ScheduledTasks {
|
| Line 4450... |
Line 4305... |
| 4450 |
|
4305 |
|
| 4451 |
|
4306 |
|
| 4452 |
@Autowired
|
4307 |
@Autowired
|
| 4453 |
private VendorCatalogPricingService vendorCatalogPricingService;
|
4308 |
private VendorCatalogPricingService vendorCatalogPricingService;
|
| 4454 |
|
4309 |
|
| 4455 |
@Autowired
|
- |
|
| 4456 |
private VendorCatalogPricingRepository vendorCatalogPricingRepository;
|
- |
|
| 4457 |
|
- |
|
| 4458 |
|
4310 |
|
| 4459 |
public void migrateVendorItemPricing() {
|
4311 |
public void migrateVendorItemPricing() {
|
| 4460 |
|
4312 |
|
| 4461 |
List<VendorItemPricing> vendorItemPricings = vendorItemPricingRepository.selectAll();
|
4313 |
List<VendorItemPricing> vendorItemPricings = vendorItemPricingRepository.selectAll();
|
| 4462 |
|
4314 |
|
| Line 4497... |
Line 4349... |
| 4497 |
for (VendorCatalogPricingLog vendorCatalogPricingLog : vendorCatalogPricingLogs) {
|
4349 |
for (VendorCatalogPricingLog vendorCatalogPricingLog : vendorCatalogPricingLogs) {
|
| 4498 |
vendorCatalogPricingLog.setStatus(VendorCatalogPricingStatus.APPROVED);
|
4350 |
vendorCatalogPricingLog.setStatus(VendorCatalogPricingStatus.APPROVED);
|
| 4499 |
vendorCatalogPricingLog.setUpdatedTimestamp(LocalDateTime.now());
|
4351 |
vendorCatalogPricingLog.setUpdatedTimestamp(LocalDateTime.now());
|
| 4500 |
vendorCatalogPricingLog.setApprovedBy(13);
|
4352 |
vendorCatalogPricingLog.setApprovedBy(13);
|
| 4501 |
vendorCatalogPricingLog.setApprovedTimestamp(LocalDateTime.now());
|
4353 |
vendorCatalogPricingLog.setApprovedTimestamp(LocalDateTime.now());
|
| - |
|
4354 |
vendorCatalogPricingService.createVendorCatalogPricing(vendorCatalogPricingLog);
|
| - |
|
4355 |
}
|
| 4502 |
|
4356 |
|
| 4503 |
VendorCatalogPricing vendorCatalogPricing = new VendorCatalogPricing();
|
- |
|
| 4504 |
vendorCatalogPricing.setVendorId(vendorCatalogPricingLog.getVendorId());
|
- |
|
| 4505 |
vendorCatalogPricing.setCatalogId(vendorCatalogPricingLog.getCatalogId());
|
- |
|
| 4506 |
vendorCatalogPricing.setDealerPrice(vendorCatalogPricingLog.getDealerPrice());
|
- |
|
| 4507 |
vendorCatalogPricing.setTransferPrice(vendorCatalogPricingLog.getTransferPrice());
|
- |
|
| 4508 |
vendorCatalogPricing.setMop(vendorCatalogPricingLog.getMop());
|
- |
|
| 4509 |
vendorCatalogPricing.setEffectedOn(vendorCatalogPricingLog.getEffectedOn());
|
- |
|
| 4510 |
vendorCatalogPricing.setUpdated_on(LocalDateTime.now());
|
- |
|
| 4511 |
vendorCatalogPricingRepository.persist(vendorCatalogPricing);
|
- |
|
| - |
|
4357 |
}
|
| 4512 |
|
4358 |
|
| 4513 |
|
4359 |
|
| 4514 |
}
|
- |
|
| 4515 |
}
|
- |
|
| 4516 |
}
|
4360 |
}
|
| 4517 |
// 2284'
|
4361 |
// 2284'
|
| 4518 |
|
4362 |
|