| Line 9... |
Line 9... |
| 9 |
import java.util.Map;
|
9 |
import java.util.Map;
|
| 10 |
import java.util.Set;
|
10 |
import java.util.Set;
|
| 11 |
import java.util.stream.Collectors;
|
11 |
import java.util.stream.Collectors;
|
| 12 |
|
12 |
|
| 13 |
import org.apache.commons.io.output.ByteArrayOutputStream;
|
13 |
import org.apache.commons.io.output.ByteArrayOutputStream;
|
| - |
|
14 |
import org.apache.logging.log4j.LogManager;
|
| - |
|
15 |
import org.apache.logging.log4j.Logger;
|
| 14 |
import org.springframework.beans.factory.annotation.Autowired;
|
16 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 15 |
import org.springframework.core.io.ByteArrayResource;
|
17 |
import org.springframework.core.io.ByteArrayResource;
|
| 16 |
import org.springframework.mail.javamail.JavaMailSender;
|
18 |
import org.springframework.mail.javamail.JavaMailSender;
|
| 17 |
import org.springframework.stereotype.Component;
|
19 |
import org.springframework.stereotype.Component;
|
| 18 |
import org.springframework.transaction.annotation.Transactional;
|
20 |
import org.springframework.transaction.annotation.Transactional;
|
| 19 |
|
21 |
|
| 20 |
import com.google.common.collect.Sets;
|
22 |
import com.google.common.collect.Sets;
|
| - |
|
23 |
import com.smartdukaan.cron.Application;
|
| 21 |
import com.spice.profitmandi.common.util.FileUtil;
|
24 |
import com.spice.profitmandi.common.util.FileUtil;
|
| 22 |
import com.spice.profitmandi.common.util.FormattingUtils;
|
25 |
import com.spice.profitmandi.common.util.FormattingUtils;
|
| 23 |
import com.spice.profitmandi.common.util.Utils;
|
26 |
import com.spice.profitmandi.common.util.Utils;
|
| 24 |
import com.spice.profitmandi.dao.entity.catalog.Scheme;
|
27 |
import com.spice.profitmandi.dao.entity.catalog.Scheme;
|
| 25 |
import com.spice.profitmandi.dao.entity.fofo.FofoLineItem;
|
28 |
import com.spice.profitmandi.dao.entity.fofo.FofoLineItem;
|
| Line 51... |
Line 54... |
| 51 |
import in.shop2020.model.v1.order.WalletReferenceType;
|
54 |
import in.shop2020.model.v1.order.WalletReferenceType;
|
| 52 |
|
55 |
|
| 53 |
@Component
|
56 |
@Component
|
| 54 |
@Transactional(rollbackFor = Throwable.class)
|
57 |
@Transactional(rollbackFor = Throwable.class)
|
| 55 |
public class Reconciliation {
|
58 |
public class Reconciliation {
|
| - |
|
59 |
|
| - |
|
60 |
private static final Logger LOGGER = LogManager.getLogger(Application.class);
|
| - |
|
61 |
|
| 56 |
@Autowired
|
62 |
@Autowired
|
| 57 |
private FofoStoreRepository fofoStoreRepository;
|
63 |
private FofoStoreRepository fofoStoreRepository;
|
| 58 |
|
64 |
|
| 59 |
@Autowired
|
65 |
@Autowired
|
| 60 |
private PurchaseRepository purchaseRepository;
|
66 |
private PurchaseRepository purchaseRepository;
|
| Line 303... |
Line 309... |
| 303 |
Order order;
|
309 |
Order order;
|
| 304 |
if(outRecord.getOrderId()==0) {
|
310 |
if(outRecord.getOrderId()==0) {
|
| 305 |
continue;
|
311 |
continue;
|
| 306 |
} else {
|
312 |
} else {
|
| 307 |
order = orderRepository.selectById(outRecord.getOrderId());
|
313 |
order = orderRepository.selectById(outRecord.getOrderId());
|
| - |
|
314 |
if(order==null) {
|
| - |
|
315 |
LOGGER
|
| - |
|
316 |
}
|
| - |
|
317 |
|
| 308 |
}
|
318 |
}
|
| 309 |
order.getInvoiceNumber();
|
319 |
order.getInvoiceNumber();
|
| 310 |
ii.getSerialNumber();
|
320 |
ii.getSerialNumber();
|
| 311 |
System.out.println(String.format("%d\t%s\t%d\t%d\t%s\t%s\t%f\t%f\t%d\t%s\t%s",
|
321 |
System.out.println(String.format("%d\t%s\t%d\t%d\t%s\t%s\t%f\t%f\t%d\t%s\t%s",
|
| 312 |
ii.getId(), ii.getSerialNumber(), ii.getId(), schemeInOut.getSchemeId(), scheme.getName(), scheme.getType(),
|
322 |
ii.getId(), ii.getSerialNumber(), ii.getId(), schemeInOut.getSchemeId(), scheme.getName(), scheme.getType(),
|