| 7410 |
amar.kumar |
1 |
/**
|
|
|
2 |
*
|
|
|
3 |
*/
|
|
|
4 |
package in.shop2020.warehouse.domain;
|
|
|
5 |
|
|
|
6 |
import java.util.Date;
|
|
|
7 |
|
|
|
8 |
import in.shop2020.generic.ExceptionType;
|
|
|
9 |
import in.shop2020.purchase.LineItem;
|
|
|
10 |
import in.shop2020.purchase.PurchaseOrder;
|
|
|
11 |
import in.shop2020.purchase.PurchaseService.Client;
|
|
|
12 |
import in.shop2020.thrift.clients.PurchaseClient;
|
|
|
13 |
import in.shop2020.warehouse.ScanType;
|
|
|
14 |
import in.shop2020.warehouse.TransferLotStatus;
|
|
|
15 |
import in.shop2020.warehouse.WarehouseServiceException;
|
|
|
16 |
|
|
|
17 |
import org.apache.commons.logging.Log;
|
|
|
18 |
import org.apache.commons.logging.LogFactory;
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
/**
|
|
|
22 |
* @author mandeep
|
|
|
23 |
*
|
|
|
24 |
*/
|
|
|
25 |
public class TransferLot {
|
|
|
26 |
private static Log logger = LogFactory.getLog(TransferLot.class);
|
|
|
27 |
|
|
|
28 |
private long id;
|
|
|
29 |
private long originWarehouseId;
|
|
|
30 |
private long destinationWarehouseId;
|
|
|
31 |
private TransferLotStatus status;
|
|
|
32 |
private Date transferDate;
|
|
|
33 |
private String transitCompletionReferenceNumber;
|
|
|
34 |
private Date referenceUpdationDate;
|
|
|
35 |
private String remarks;
|
|
|
36 |
|
|
|
37 |
public static TransferLot create(in.shop2020.warehouse.transferLot thriftTransferLot) {
|
|
|
38 |
TransferLot transferLot = new TransferLot();
|
|
|
39 |
transferLot.id = thriftTransferLot.getId();
|
|
|
40 |
transferLot.originWarehouseId = thriftTransferLot.getOriginWarehouseId();
|
|
|
41 |
transferLot.destinationWarehouseId = thriftTransferLot.getDestinationWarehouseId();
|
|
|
42 |
transferLot.status = thriftTransferLot.getStatus();
|
|
|
43 |
transferLot.transferDate = new Date(thriftTransferLot.getTransferDate());
|
|
|
44 |
transferLot.transitCompletionReferenceNumber = thriftTransferLot.getTransitCompletionReferenceNumber();
|
|
|
45 |
transferLot.referenceUpdationDate = new Date(thriftTransferLot.getReferenceUpdationDate());
|
|
|
46 |
transferLot.remarks = thriftTransferLot.getRemarks();
|
|
|
47 |
return transferLot;
|
|
|
48 |
}
|
|
|
49 |
|
|
|
50 |
public in.shop2020.warehouse.TransferLot convert() throws WarehouseServiceException {
|
|
|
51 |
in.shop2020.warehouse.TransferLot transferLot = new in.shop2020.warehouse.TransferLot();
|
|
|
52 |
transferLot.setId(id);
|
|
|
53 |
transferLot.setOriginWarehouseId(originWarehouseId);
|
|
|
54 |
transferLot.setDestinationWarehouseId(destinationWarehouseId);
|
|
|
55 |
transferLot.setTransferDate(transferDate.getTime());
|
|
|
56 |
transferLot.setStatus(status);
|
|
|
57 |
transferLot.setTransitCompletionReferenceNumber(transitCompletionReferenceNumber);
|
|
|
58 |
if(referenceUpdationDate!=null) {
|
|
|
59 |
transferLot.setReferenceUpdationDate(referenceUpdationDate.getTime());
|
|
|
60 |
}
|
|
|
61 |
transferLot.setRemarks(remarks);
|
|
|
62 |
return transferLot;
|
|
|
63 |
}
|
|
|
64 |
|
|
|
65 |
public long getId() {
|
|
|
66 |
return id;
|
|
|
67 |
}
|
|
|
68 |
public void setId(long id) {
|
|
|
69 |
this.id = id;
|
|
|
70 |
}
|
|
|
71 |
|
|
|
72 |
public long getOriginWarehouseId() {
|
|
|
73 |
return originWarehouseId;
|
|
|
74 |
}
|
|
|
75 |
|
|
|
76 |
public void setOriginWarehouseId(long originWarehouseId) {
|
|
|
77 |
this.originWarehouseId = originWarehouseId;
|
|
|
78 |
}
|
|
|
79 |
|
|
|
80 |
public long getDestinationWarehouseId() {
|
|
|
81 |
return destinationWarehouseId;
|
|
|
82 |
}
|
|
|
83 |
|
|
|
84 |
public void setDestinationWarehouseId(long destinationWarehouseId) {
|
|
|
85 |
this.destinationWarehouseId = destinationWarehouseId;
|
|
|
86 |
}
|
|
|
87 |
|
|
|
88 |
public TransferLotStatus getStatus() {
|
|
|
89 |
return status;
|
|
|
90 |
}
|
|
|
91 |
|
|
|
92 |
public void setStatus(TransferLotStatus status) {
|
|
|
93 |
this.status = status;
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
public Date getTransferDate() {
|
|
|
97 |
return transferDate;
|
|
|
98 |
}
|
|
|
99 |
|
|
|
100 |
public void setTransferDate(Date transferDate) {
|
|
|
101 |
this.transferDate = transferDate;
|
|
|
102 |
}
|
|
|
103 |
|
|
|
104 |
public String getTransitCompletionReferenceNumber() {
|
|
|
105 |
return transitCompletionReferenceNumber;
|
|
|
106 |
}
|
|
|
107 |
|
|
|
108 |
public void setTransitCompletionReferenceNumber(
|
|
|
109 |
String transitCompletionReferenceNumber) {
|
|
|
110 |
this.transitCompletionReferenceNumber = transitCompletionReferenceNumber;
|
|
|
111 |
}
|
|
|
112 |
|
|
|
113 |
public Date getReferenceUpdationDate() {
|
|
|
114 |
return referenceUpdationDate;
|
|
|
115 |
}
|
|
|
116 |
|
|
|
117 |
public void setReferenceUpdationDate(Date referenceUpdationDate) {
|
|
|
118 |
this.referenceUpdationDate = referenceUpdationDate;
|
|
|
119 |
}
|
|
|
120 |
|
|
|
121 |
public String getRemarks() {
|
|
|
122 |
return remarks;
|
|
|
123 |
}
|
|
|
124 |
|
|
|
125 |
public void setRemarks(String remarks) {
|
|
|
126 |
this.remarks = remarks;
|
|
|
127 |
}
|
|
|
128 |
|
|
|
129 |
}
|