|
@@ -13,17 +13,12 @@ import javax.persistence.Id;
|
|
|
import javax.persistence.Inheritance;
|
|
import javax.persistence.Inheritance;
|
|
|
import javax.persistence.InheritanceType;
|
|
import javax.persistence.InheritanceType;
|
|
|
import javax.persistence.Lob;
|
|
import javax.persistence.Lob;
|
|
|
|
|
+import javax.persistence.PostLoad;
|
|
|
import javax.persistence.Table;
|
|
import javax.persistence.Table;
|
|
|
import javax.persistence.Temporal;
|
|
import javax.persistence.Temporal;
|
|
|
import javax.persistence.TemporalType;
|
|
import javax.persistence.TemporalType;
|
|
|
import javax.persistence.UniqueConstraint;
|
|
import javax.persistence.UniqueConstraint;
|
|
|
|
|
|
|
|
-import org.apache.commons.lang3.BooleanUtils;
|
|
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
-import org.apache.openjpa.persistence.Persistent;
|
|
|
|
|
-import org.apache.openjpa.persistence.jdbc.Index;
|
|
|
|
|
-import org.apache.openjpa.persistence.jdbc.Strategy;
|
|
|
|
|
-
|
|
|
|
|
import com.x.base.core.entity.JpaObject;
|
|
import com.x.base.core.entity.JpaObject;
|
|
|
import com.x.base.core.entity.SliceJpaObject;
|
|
import com.x.base.core.entity.SliceJpaObject;
|
|
|
import com.x.base.core.entity.annotation.CheckPersist;
|
|
import com.x.base.core.entity.annotation.CheckPersist;
|
|
@@ -36,6 +31,12 @@ import com.x.processplatform.core.entity.PersistenceProperties;
|
|
|
import com.x.processplatform.core.entity.element.ActivityType;
|
|
import com.x.processplatform.core.entity.element.ActivityType;
|
|
|
import com.x.processplatform.core.entity.element.Route;
|
|
import com.x.processplatform.core.entity.element.Route;
|
|
|
|
|
|
|
|
|
|
+import org.apache.commons.lang3.BooleanUtils;
|
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
+import org.apache.openjpa.persistence.Persistent;
|
|
|
|
|
+import org.apache.openjpa.persistence.jdbc.Index;
|
|
|
|
|
+import org.apache.openjpa.persistence.jdbc.Strategy;
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 没有多值字段
|
|
* 没有多值字段
|
|
|
*
|
|
*
|
|
@@ -55,7 +56,6 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
|
|
|
private static final String TABLE = PersistenceProperties.Content.TaskCompleted.table;
|
|
private static final String TABLE = PersistenceProperties.Content.TaskCompleted.table;
|
|
|
|
|
|
|
|
/* 继续流转 */
|
|
/* 继续流转 */
|
|
|
-// private static final String PROCESSINGTYPE_processing = "processing";
|
|
|
|
|
public static final String PROCESSINGTYPE_TASK = "task";
|
|
public static final String PROCESSINGTYPE_TASK = "task";
|
|
|
/* 开始 */
|
|
/* 开始 */
|
|
|
public static final String PROCESSINGTYPE_START = "start";
|
|
public static final String PROCESSINGTYPE_START = "start";
|
|
@@ -106,29 +106,41 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
|
|
|
if (null == this.routeName) {
|
|
if (null == this.routeName) {
|
|
|
this.routeName = "";
|
|
this.routeName = "";
|
|
|
}
|
|
}
|
|
|
- if (StringTools.utf8Length(this.getOpinion()) > length_255B) {
|
|
|
|
|
- this.opinionLob = this.getOpinion();
|
|
|
|
|
- this.opinion = StringTools.utf8SubString(this.getOpinion(), length_255B);
|
|
|
|
|
- } else {
|
|
|
|
|
- this.opinion = Objects.toString(this.getOpinion(), "");
|
|
|
|
|
- this.opinionLob = null;
|
|
|
|
|
- }
|
|
|
|
|
if (Objects.isNull(this.processingType)) {
|
|
if (Objects.isNull(this.processingType)) {
|
|
|
this.processingType = PROCESSINGTYPE_TASK;
|
|
this.processingType = PROCESSINGTYPE_TASK;
|
|
|
}
|
|
}
|
|
|
switch (this.processingType) {
|
|
switch (this.processingType) {
|
|
|
- case PROCESSINGTYPE_APPENDTASK:
|
|
|
|
|
- case PROCESSINGTYPE_BEAPPENDEDTASK:
|
|
|
|
|
- case PROCESSINGTYPE_REROUTE:
|
|
|
|
|
- case PROCESSINGTYPE_RETRACT:
|
|
|
|
|
- case PROCESSINGTYPE_ROLLBACK:
|
|
|
|
|
- case PROCESSINGTYPE_EMPOWER:
|
|
|
|
|
- case PROCESSINGTYPE_RESET:
|
|
|
|
|
- this.joinInquire = false;
|
|
|
|
|
- break;
|
|
|
|
|
- default:
|
|
|
|
|
- this.joinInquire = true;
|
|
|
|
|
- break;
|
|
|
|
|
|
|
+ case PROCESSINGTYPE_APPENDTASK:
|
|
|
|
|
+ case PROCESSINGTYPE_BEAPPENDEDTASK:
|
|
|
|
|
+ case PROCESSINGTYPE_REROUTE:
|
|
|
|
|
+ case PROCESSINGTYPE_RETRACT:
|
|
|
|
|
+ case PROCESSINGTYPE_ROLLBACK:
|
|
|
|
|
+ case PROCESSINGTYPE_EMPOWER:
|
|
|
|
|
+ case PROCESSINGTYPE_RESET:
|
|
|
|
|
+ this.joinInquire = false;
|
|
|
|
|
+ break;
|
|
|
|
|
+ default:
|
|
|
|
|
+ this.joinInquire = true;
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (StringTools.utf8Length(this.getProperties().getTitle()) > length_255B) {
|
|
|
|
|
+ this.title = StringTools.utf8SubString(this.getProperties().getTitle(), length_255B - 3) + "...";
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StringTools.utf8Length(this.getProperties().getOpinion()) > length_255B) {
|
|
|
|
|
+ this.opinion = StringTools.utf8SubString(this.getProperties().getOpinion(), length_255B - 3) + "...";
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PostLoad
|
|
|
|
|
+ public void postLoad() {
|
|
|
|
|
+ if (null != this.properties) {
|
|
|
|
|
+ if (StringUtils.isNotEmpty(this.getProperties().getTitle())) {
|
|
|
|
|
+ this.title = this.getProperties().getTitle();
|
|
|
|
|
+ }
|
|
|
|
|
+ if (StringUtils.isNotEmpty(this.getProperties().getOpinion())) {
|
|
|
|
|
+ this.opinion = this.getProperties().getOpinion();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -142,22 +154,20 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
|
|
|
|
|
|
|
|
public void setOpinion(String opinion) {
|
|
public void setOpinion(String opinion) {
|
|
|
this.opinion = opinion;
|
|
this.opinion = opinion;
|
|
|
|
|
+ this.getProperties().setOpinion(opinion);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public String getOpinion() {
|
|
public String getOpinion() {
|
|
|
- if (StringUtils.isNotEmpty(this.opinionLob)) {
|
|
|
|
|
- return this.opinionLob;
|
|
|
|
|
- } else {
|
|
|
|
|
- return this.opinion;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ return this.opinion;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void setTitle(String title) {
|
|
public void setTitle(String title) {
|
|
|
- if (StringTools.utf8Length(title) > length_255B) {
|
|
|
|
|
- this.title = StringTools.utf8SubString(this.title, 252) + "...";
|
|
|
|
|
- } else {
|
|
|
|
|
- this.title = Objects.toString(title, "");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.title = title;
|
|
|
|
|
+ this.getProperties().setTitle(title);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public String getTitle() {
|
|
|
|
|
+ return this.title;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 更新运行方法 */
|
|
/* 更新运行方法 */
|
|
@@ -288,12 +298,6 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
|
|
|
this.duration = duration;
|
|
this.duration = duration;
|
|
|
this.processingType = processingType;
|
|
this.processingType = processingType;
|
|
|
/* 必须使用set方法,执行opinion的判断 */
|
|
/* 必须使用set方法,执行opinion的判断 */
|
|
|
-// if (StringUtils.isEmpty(task.getOpinion())) {
|
|
|
|
|
-// this.setOpinion(StringUtils.trimToEmpty(
|
|
|
|
|
-// ListTools.parallel(task.getRouteNameList(), task.getRouteName(), task.getRouteOpinionList())));
|
|
|
|
|
-// } else {
|
|
|
|
|
-// this.setOpinion(task.getOpinion());
|
|
|
|
|
-// }
|
|
|
|
|
this.setOpinion(task.getOpinion());
|
|
this.setOpinion(task.getOpinion());
|
|
|
this.copyProjectionFields(task);
|
|
this.copyProjectionFields(task);
|
|
|
this.empowerFromIdentity = task.getEmpowerFromIdentity();
|
|
this.empowerFromIdentity = task.getEmpowerFromIdentity();
|
|
@@ -535,12 +539,6 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
|
|
|
@CheckPersist(allowEmpty = true)
|
|
@CheckPersist(allowEmpty = true)
|
|
|
private String routeName;
|
|
private String routeName;
|
|
|
|
|
|
|
|
-// public static final String opinionGroup_FIELDNAME = "opinionGroup";
|
|
|
|
|
-// @FieldDescribe("意见分组")
|
|
|
|
|
-// @CheckPersist(allowEmpty = true)
|
|
|
|
|
-// @Column(length = JpaObject.length_255B, name = ColumnNamePrefix + opinionGroup_FIELDNAME)
|
|
|
|
|
-// private String opinionGroup;
|
|
|
|
|
-
|
|
|
|
|
public static final String opinion_FIELDNAME = "opinion";
|
|
public static final String opinion_FIELDNAME = "opinion";
|
|
|
@FieldDescribe("处理意见.")
|
|
@FieldDescribe("处理意见.")
|
|
|
@Column(length = JpaObject.length_255B, name = ColumnNamePrefix + opinion_FIELDNAME)
|
|
@Column(length = JpaObject.length_255B, name = ColumnNamePrefix + opinion_FIELDNAME)
|
|
@@ -575,14 +573,6 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
|
|
|
@CheckPersist(allowEmpty = false)
|
|
@CheckPersist(allowEmpty = false)
|
|
|
private Long duration;
|
|
private Long duration;
|
|
|
|
|
|
|
|
-// public static final String processingType_FIELDNAME = "processingType";
|
|
|
|
|
-// @FieldDescribe("流程流转类型")
|
|
|
|
|
-// @Enumerated(EnumType.STRING)
|
|
|
|
|
-// @Column(length = ProcessingType.length, name = ColumnNamePrefix + processingType_FIELDNAME)
|
|
|
|
|
-// @Index(name = TABLE + IndexNameMiddle + processingType_FIELDNAME)
|
|
|
|
|
-// @CheckPersist(allowEmpty = false)
|
|
|
|
|
-// private ProcessingType processingType;
|
|
|
|
|
-
|
|
|
|
|
public static final String processingType_FIELDNAME = "processingType";
|
|
public static final String processingType_FIELDNAME = "processingType";
|
|
|
@FieldDescribe("流程流转类型")
|
|
@FieldDescribe("流程流转类型")
|
|
|
@Column(length = JpaObject.length_16B, name = ColumnNamePrefix + processingType_FIELDNAME)
|
|
@Column(length = JpaObject.length_16B, name = ColumnNamePrefix + processingType_FIELDNAME)
|
|
@@ -643,14 +633,6 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
|
|
|
@CheckPersist(allowEmpty = true)
|
|
@CheckPersist(allowEmpty = true)
|
|
|
private Boolean joinInquire;
|
|
private Boolean joinInquire;
|
|
|
|
|
|
|
|
-// public static final String nextTaskIdentityListText_FIELDNAME = "nextTaskIdentityListText";
|
|
|
|
|
-// @FieldDescribe("下一环节处理人记录,记录前台处理待办产生的提示.")
|
|
|
|
|
-// @Lob
|
|
|
|
|
-// @Basic(fetch = FetchType.EAGER)
|
|
|
|
|
-// @Column(length = JpaObject.length_1M, name = ColumnNamePrefix + nextTaskIdentityListText_FIELDNAME)
|
|
|
|
|
-// @CheckPersist(allowEmpty = true)
|
|
|
|
|
-// private String nextTaskIdentityListText;
|
|
|
|
|
-
|
|
|
|
|
public static final String properties_FIELDNAME = "properties";
|
|
public static final String properties_FIELDNAME = "properties";
|
|
|
@FieldDescribe("属性对象存储字段.")
|
|
@FieldDescribe("属性对象存储字段.")
|
|
|
@Persistent
|
|
@Persistent
|
|
@@ -893,10 +875,6 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
|
|
|
this.job = job;
|
|
this.job = job;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public String getTitle() {
|
|
|
|
|
- return title;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
public Date getStartTime() {
|
|
public Date getStartTime() {
|
|
|
return startTime;
|
|
return startTime;
|
|
|
}
|
|
}
|
|
@@ -1077,14 +1055,6 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
|
|
|
this.activityType = activityType;
|
|
this.activityType = activityType;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // public ManualMode getManualMode() {
|
|
|
|
|
- // return manualMode;
|
|
|
|
|
- // }
|
|
|
|
|
- //
|
|
|
|
|
- // public void setManualMode(ManualMode manualMode) {
|
|
|
|
|
- // this.manualMode = manualMode;
|
|
|
|
|
- // }
|
|
|
|
|
-
|
|
|
|
|
public String getStartTimeMonth() {
|
|
public String getStartTimeMonth() {
|
|
|
return startTimeMonth;
|
|
return startTimeMonth;
|
|
|
}
|
|
}
|
|
@@ -1093,14 +1063,6 @@ public class TaskCompleted extends SliceJpaObject implements ProjectionInterface
|
|
|
this.startTimeMonth = startTimeMonth;
|
|
this.startTimeMonth = startTimeMonth;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-// public ProcessingType getProcessingType() {
|
|
|
|
|
-// return processingType;
|
|
|
|
|
-// }
|
|
|
|
|
-//
|
|
|
|
|
-// public void setProcessingType(ProcessingType processingType) {
|
|
|
|
|
-// this.processingType = processingType;
|
|
|
|
|
-// }
|
|
|
|
|
-
|
|
|
|
|
public String getSerial() {
|
|
public String getSerial() {
|
|
|
return serial;
|
|
return serial;
|
|
|
}
|
|
}
|