IT-KIMI_SHI\SINOIT.KIMI
2018-06-01 64c40fb427bff513f575f11e4c1e7bd9a1bfe3e3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
package frame.file;
 
import org.apache.poi.ss.format.CellFormatType;
 
import com.alibaba.druid.sql.ast.statement.SQLCommentStatement.Type;
 
import frame.data.DataType;
import frame.data.meta.EntityMeta;
import frame.data.meta.Field;
 
public class IOMappingItemRuntime {
     private IOMappingItem item;
     private String fromField;
     private int fromIndex;
     private DataType fromType;
     private String toField;
     private int toIndex;
     private DataType toType;
     
     public IOMappingItemRuntime(IOMappingItem ioMappingItem, String fromField, Field fieldByFrom, String toField,  Field fieldByto) {
         item = ioMappingItem;
         this.fromField = fromField == null ? null : fromField.toLowerCase();
 
         if (fieldByFrom != null) {
             fromIndex = fieldByFrom.getFieldCount();
             fromType = fieldByFrom.getDataType();
         }
         else {
             fromIndex = -1;
             fromType = null;
         }
         
         //2. set to
         this.toField = toField == null ? null : toField.toLowerCase();
 
         if (fieldByto != null) {
             toIndex = fieldByto.();
             toType = fieldByto.getName();
         }
         else {
             toIndex = -1;
             toType = null;
         }
     }
     
     public CellFormatType[] getExportType() {
         if (item != null) {
             CellFormatType[] result = item.getExportType();
 
             if (result != null) {
                 return result;
             }
         }
 
         CellFormatType cellType = CellTypes.toExcelCellType(fromType);
         return new CellFormatType[1] { cellType.Value };
     }
     
     public IOMappingItem getItem() {
         return item;
     }
 
     public String getFromField() {
         return fromField;
     }
 
     public int getFromIndex() {
         return fromIndex;
     }
 
     public String getFromType() {
         return fromType;
     }
 
     public String getToField() {
         return toField;
     }
 
     public int getToIndex() {
         return toIndex;
     }
 
     public String getToType() {
         return toType;
     }
     
}