d492fefc3d244ff279169f1f571cf0f2577badd7.svn-base
4.73 KB
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
/**
* There are <a href="">JeeSite</a> code generation
*/
package com.thinkgem.jeesite.modules.oa.entity;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.activiti.engine.history.HistoricProcessInstance;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.Task;
import org.hibernate.validator.constraints.Length;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.collect.Lists;
import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.sys.entity.User;
import com.thinkgem.jeesite.modules.sys.utils.DictUtils;
/**
* 请假Entity
* @author liuj
* @version 2013-04-05
*/
public class Leave extends DataEntity<Leave> {
private static final long serialVersionUID = 1L;
private String reason; // 请假原因
private String processInstanceId; // 流程实例编号
private Date startTime; // 请假开始日期
private Date endTime; // 请假结束日期
private Date realityStartTime; // 实际开始时间
private Date realityEndTime; // 实际结束时间
private String leaveType; // 假种
private String ids;
private Date createDateStart;
private Date createDateEnd;
//-- 临时属性 --//
// 流程任务
private Task task;
private Map<String, Object> variables;
// 运行中的流程实例
private ProcessInstance processInstance;
// 历史的流程实例
private HistoricProcessInstance historicProcessInstance;
// 流程定义
private ProcessDefinition processDefinition;
public Leave() {
super();
}
public Leave(String id){
super();
}
public String getLeaveType() {
return leaveType;
}
public void setLeaveType(String leaveType) {
this.leaveType = leaveType;
}
public String getLeaveTypeDictLabel() {
return DictUtils.getDictLabel(leaveType, "oa_leave_type", "");
}
@Length(min=1, max=255)
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public String getProcessInstanceId() {
return processInstanceId;
}
public void setProcessInstanceId(String processInstanceId) {
this.processInstanceId = processInstanceId;
}
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
public Date getRealityStartTime() {
return realityStartTime;
}
public void setRealityStartTime(Date realityStartTime) {
this.realityStartTime = realityStartTime;
}
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
public Date getRealityEndTime() {
return realityEndTime;
}
public void setRealityEndTime(Date realityEndTime) {
this.realityEndTime = realityEndTime;
}
public User getUser() {
return createBy;
}
public void setUser(User user) {
this.createBy = user;
}
public Task getTask() {
return task;
}
public void setTask(Task task) {
this.task = task;
}
public Map<String, Object> getVariables() {
return variables;
}
public void setVariables(Map<String, Object> variables) {
this.variables = variables;
}
public ProcessInstance getProcessInstance() {
return processInstance;
}
public void setProcessInstance(ProcessInstance processInstance) {
this.processInstance = processInstance;
}
public HistoricProcessInstance getHistoricProcessInstance() {
return historicProcessInstance;
}
public void setHistoricProcessInstance(HistoricProcessInstance historicProcessInstance) {
this.historicProcessInstance = historicProcessInstance;
}
public ProcessDefinition getProcessDefinition() {
return processDefinition;
}
public void setProcessDefinition(ProcessDefinition processDefinition) {
this.processDefinition = processDefinition;
}
public String getIds() {
List<String> idList = Lists.newArrayList();
if (StringUtils.isNotBlank(ids)){
String ss = ids.trim().replace(" ", ",").replace(" ",",").replace(",", ",").replace("'", "");
for(String s : ss.split(",")) {
// if(s.matches("\\d*")) {
idList.add("'"+s+"'");
// }
}
}
return StringUtils.join(idList, ",");
}
public void setIds(String ids) {
this.ids = ids;
}
public Date getCreateDateStart() {
return createDateStart;
}
public void setCreateDateStart(Date createDateStart) {
this.createDateStart = createDateStart;
}
public Date getCreateDateEnd() {
return createDateEnd;
}
public void setCreateDateEnd(Date createDateEnd) {
this.createDateEnd = createDateEnd;
}
}