IT-KIMI_SHI\SINOIT.KIMI
2018-06-01 521993214708c66a5498bd669c94a661c11484b2
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
package frame.role;
 
import java.sql.ResultSet;
import java.util.HashMap;
import java.util.Map;
 
import frame.persist.ILoadable;
import frame.persist.loader.ObjectLoader;
import frame.util.Util;
 
 
public class OnlineUser implements ILoadable {
 
    protected String id;
    protected String name;
    protected String password;
    protected String rolecode;
    protected String phone;
    protected String type;
    protected String emp_id;
    protected String emp_name;
    protected String emp_enName;
    protected String emp_title;
    protected String emp_enTitle;
    protected String emp_department;
    protected String emp_enDepartment;
    protected String emp_position;
    protected int activeYear;
    protected int activeMonth;
    protected String orgCode;
    protected String orgName;
    protected String orgEnName;
    protected String orgid;
    protected String defaultRowfilter;
    protected boolean onlyOne;
    protected Map<String, String> rowfilterMap;
    protected FileLockManager fileLockManager;
    protected Map<String, Object> dataMap;
    
    
    public OnlineUser() {
        rowfilterMap = new HashMap<String, String>();
        fileLockManager = new FileLockManager();
    }
 
    public String getPhone() {
        return phone;
    }
 
    public void setPhone(String phone) {
        this.phone = phone;
    }
 
    public synchronized String getRowfilter(String data, String template) {
        if (!Util.isEmptyStr(defaultRowfilter)) {
            return defaultRowfilter;
        }
        
        String rowfilter = rowfilterMap.get(data);
        
        if (rowfilter != null) {
            return rowfilter;
        }
        
        if (template == null) {
            return null;
        }
        
        rowfilter = template.replace("@{userid}", id);
        rowfilter = rowfilter.replace("@{orgid}", orgid);
        
        rowfilterMap.put(data, rowfilter);
        
        return rowfilter;
    }
 
    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }
 
    public boolean isEmpty() {
        return Util.isEmptyStr(id);
    }
    
    public String getId() {
        return id;
    }
 
    public String getOrgName() {
        return orgName;
    }
 
    @Override
    public void load(ResultSet rslt, Object... args) throws Exception {
        onlyOne = true;
        
        ObjectLoader loader = new ObjectLoader("usr", this.getClass());
        loader.setObject(this);
        loader.load(rslt, args);
        
        if (rslt.next()) {
            onlyOne = false;
        }
    }
 
    public String getOrgId() {
        return orgid;
    }
    
    public String getOrgCode() {
        return orgCode;
    }
    
    public String getRoleCode() {
        return rolecode;
    }
 
    public boolean isOnlyOne() {
        return onlyOne;
    }
    
    public String getRolecode() {
        return rolecode;
    }
    
    public String getPassword() {
        return password;
    }
 
    public void setPassword(String password) {
        this.password = password;
    }
 
    public void setRolecode(String rolecode) {
        this.rolecode = rolecode;
    }
 
    public String getOrgid() {
        return orgid;
    }
 
    public void setOrgid(String orgid) {
        this.orgid = orgid;
    }
 
    public void setId(String id) {
        this.id = id;
    }
 
    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }
    
    public String getOrgEnName() {
        return orgEnName;
    }
 
    public void setOrgEnName(String orgEnName) {
        this.orgEnName = orgEnName;
    }
 
    public String getName() {
        return name;
    }
 
    public void setName(String name) {
        this.name = name;
    }
    
    public String getEmp_id() {
        return emp_id;
    }
 
    public void setEmp_id(String emp_id) {
        this.emp_id = emp_id;
    }
 
    public String getEmp_name() {
        return emp_name;
    }
 
    public void setEmp_name(String emp_name) {
        this.emp_name = emp_name;
    }
 
    public String getEmp_enName() {
        return emp_enName;
    }
 
    public void setEmp_enName(String emp_enName) {
        this.emp_enName = emp_enName;
    }
 
    public String getEmp_title() {
        return emp_title;
    }
 
    public void setEmp_title(String emp_title) {
        this.emp_title = emp_title;
    }
 
    public String getEmp_enTitle() {
        return emp_enTitle;
    }
 
    public void setEmp_enTitle(String emp_enTitle) {
        this.emp_enTitle = emp_enTitle;
    }
 
    public String getEmp_department() {
        return emp_department;
    }
 
    public void setEmp_department(String emp_department) {
        this.emp_department = emp_department;
    }
 
    public String getEmp_enDepartment() {
        return emp_enDepartment;
    }
 
    public void setEmp_enDepartment(String emp_enDepartment) {
        this.emp_enDepartment = emp_enDepartment;
    }
 
    public String getEmp_position() {
        return emp_position;
    }
 
    public void setEmp_position(String emp_position) {
        this.emp_position = emp_position;
    }
 
    public int getActiveYear() {
        return activeYear;
    }
 
    public int getActiveMonth() {
        return activeMonth;
    }
 
    public String getType() {
        return type;
    }
 
    public void setType(String type) {
        this.type = type;
    }
 
    public FileProgressor getFileProgress(String code) {
        return fileLockManager.getFileProgress(code);
    }
 
    public FileLock getFileLock(String name) {
        return fileLockManager.getLock(name);
    }
 
    public Object getData(String name) {
        return dataMap.get(name);
    }
    
    public void setData(String name, Object data) {
        dataMap.put(name, data);
    }
 
    public UserRight getUserRight() {
        // TODO Auto-generated method stub
        return null;
    }
}