| Line 31... |
Line 31... |
| 31 |
import org.springframework.core.io.ByteArrayResource;
|
31 |
import org.springframework.core.io.ByteArrayResource;
|
| 32 |
import org.springframework.mail.javamail.JavaMailSender;
|
32 |
import org.springframework.mail.javamail.JavaMailSender;
|
| 33 |
import org.springframework.stereotype.Component;
|
33 |
import org.springframework.stereotype.Component;
|
| 34 |
import org.springframework.transaction.annotation.Transactional;
|
34 |
import org.springframework.transaction.annotation.Transactional;
|
| 35 |
|
35 |
|
| - |
|
36 |
import com.smartdukaan.cron.scheduled.SamsungIMEIActivationService;
|
| 36 |
import com.smartdukaan.cron.scheduled.ScheduledTasks;
|
37 |
import com.smartdukaan.cron.scheduled.ScheduledTasks;
|
| 37 |
import com.spice.profitmandi.common.enumuration.ItemType;
|
38 |
import com.spice.profitmandi.common.enumuration.ItemType;
|
| 38 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
39 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 39 |
import com.spice.profitmandi.common.services.SamsungIMEIActivationService;
|
- |
|
| 40 |
import com.spice.profitmandi.common.util.FileUtil;
|
40 |
import com.spice.profitmandi.common.util.FileUtil;
|
| 41 |
import com.spice.profitmandi.common.util.FormattingUtils;
|
41 |
import com.spice.profitmandi.common.util.FormattingUtils;
|
| 42 |
import com.spice.profitmandi.common.util.Utils;
|
42 |
import com.spice.profitmandi.common.util.Utils;
|
| 43 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
43 |
import com.spice.profitmandi.dao.entity.catalog.Item;
|
| 44 |
import com.spice.profitmandi.dao.entity.catalog.Scheme;
|
44 |
import com.spice.profitmandi.dao.entity.catalog.Scheme;
|
| Line 291... |
Line 291... |
| 291 |
}
|
291 |
}
|
| 292 |
|
292 |
|
| 293 |
}
|
293 |
}
|
| 294 |
|
294 |
|
| 295 |
public void fetchImeiActivation( ) throws Exception{
|
295 |
public void fetchImeiActivation( ) throws Exception{
|
| 296 |
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd[['T'][' ']]HH:mm:ss");
|
- |
|
| 297 |
System.out.println(LocalDateTime.parse("2019-01-01 00:00:00", df));
|
- |
|
| 298 |
System.out.println(LocalDateTime.parse("2019-01-01T00:00:00", df));
|
- |
|
| 299 |
System.out.println("Done");
|
- |
|
| 300 |
//samsungActivationService.getActivationsBetween(LocalDate.of(2020, 1, 1), LocalDate.now());
|
296 |
samsungActivationService.getActivationsBetweenNew(LocalDate.now().minusDays(30), LocalDate.now());
|
| 301 |
}
|
297 |
}
|
| 302 |
public void migarateLineItemsToNewTable() throws Exception {
|
298 |
public void migarateLineItemsToNewTable() throws Exception {
|
| 303 |
LOGGER.info("Before Migrated LineItems Successfully");
|
299 |
LOGGER.info("Before Migrated LineItems Successfully");
|
| 304 |
int lineItemImeiId = 0;
|
300 |
int lineItemImeiId = 0;
|
| 305 |
LocalDateTime startDate = null;
|
301 |
LocalDateTime startDate = null;
|