提交 2452d378 编写于 作者: O o2sword

流程文档签批1

上级 26c6e052
......@@ -1059,7 +1059,7 @@
<dependency>
<groupId>com.microsoft.playwright</groupId>
<artifactId>playwright</artifactId>
<version>1.10.0</version>
<version>1.17.1</version>
</dependency>
<dependency>
<groupId>javax.cache</groupId>
......@@ -1102,4 +1102,4 @@
<url>http://maven.o2oa.net/repository/o2oa-release/</url>
</repository>
</distributionManagement>
</project>
\ No newline at end of file
</project>
......@@ -240,14 +240,11 @@ class ActionHtmlToImage extends BaseAction {
try (Browser browser = browserType.launch(options)) {
BrowserContext context = browser.newContext();
Page page = context.newPage();
page.navigate("file:///Users/chengjian/dev/tmp/html2Image.html");
//page.setContent("<html><body>测试一下</body></html>");
//Thread.sleep(1000);
page.navigate("file:///Users/chengjian/dev/temp/test.html");
Page.ScreenshotOptions screenshotOptions = new Page.ScreenshotOptions();
screenshotOptions.setFullPage(true);
screenshotOptions.setQuality(80);
//screenshotOptions.setQuality(2);
screenshotOptions.setPath(Paths.get("/Users/chengjian/dev/tmp/screenshot-" + browserType.name() + ".jpg"));
screenshotOptions.setPath(Paths.get("/Users/chengjian/dev/temp/screenshot-" + browserType.name() + ".png"));
page.screenshot(screenshotOptions);
break;
} catch (Exception e) {
......
......@@ -17,6 +17,10 @@ public final class PersistenceProperties extends AbstractPersistenceProperties {
public static final String table = "PP_C_DRAFT";
}
public static class DocSign {
public static final String table = "PP_C_DOC_SIGN";
}
public static class TaskCompleted {
public static final String table = "PP_C_TASKCOMPLETED";
}
......@@ -237,4 +241,4 @@ public final class PersistenceProperties extends AbstractPersistenceProperties {
public static final String table = "PP_T_SERVICEVALUE";
}
}
}
\ No newline at end of file
}
package com.x.processplatform.core.entity.content;
import com.x.base.core.entity.JpaObject;
import com.x.base.core.entity.SliceJpaObject;
import com.x.base.core.entity.annotation.CheckPersist;
import com.x.base.core.entity.annotation.ContainerEntity;
import com.x.base.core.project.annotation.FieldDescribe;
import com.x.base.core.project.tools.StringTools;
import com.x.processplatform.core.entity.PersistenceProperties;
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 javax.persistence.*;
import java.util.Date;
@Entity
@ContainerEntity(dumpSize = 5, type = ContainerEntity.Type.content, reference = ContainerEntity.Reference.strong)
@Table(name = PersistenceProperties.Content.DocSign.table, uniqueConstraints = {
@UniqueConstraint(name = PersistenceProperties.Content.DocSign.table + JpaObject.IndexNameMiddle
+ JpaObject.DefaultUniqueConstraintSuffix, columnNames = { JpaObject.IDCOLUMN,
JpaObject.CREATETIMECOLUMN, JpaObject.UPDATETIMECOLUMN, JpaObject.SEQUENCECOLUMN }) })
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
public class DocSign extends SliceJpaObject {
private static final long serialVersionUID = -6321354875403866277L;
private static final String TABLE = PersistenceProperties.Content.DocSign.table;
@Override
public String getId() {
return id;
}
@Override
public void setId(String id) {
this.id = id;
}
@FieldDescribe("数据库主键,自动生成.")
@Id
@Column(length = length_id, name = ColumnNamePrefix + id_FIELDNAME)
private String id = createId();
@Override
public void onPersist() throws Exception {
if (StringTools.utf8Length(this.getProperties().getTitle()) > length_255B) {
this.title = StringTools.utf8SubString(this.getProperties().getTitle(), length_255B - 3) + "...";
}
}
@PostLoad
public void postLoad() {
if ((null != this.properties) && StringUtils.isNotEmpty(this.getProperties().getTitle())) {
this.title = this.getProperties().getTitle();
}
}
public void setTitle(String title) {
this.title = title;
this.getProperties().setTitle(title);
}
public String getTitle() {
if ((null != this.properties) && StringUtils.isNotEmpty(this.properties.getTitle())) {
return this.properties.getTitle();
} else {
return this.title;
}
}
public DocSign() {
// nothing
}
public DocSignProperties getProperties() {
if (null == this.properties) {
this.properties = new DocSignProperties();
}
return this.properties;
}
public void setProperties(DocSignProperties properties) {
this.properties = properties;
}
public static final String title_FIELDNAME = "title";
@FieldDescribe("标题.")
@Column(length = length_255B, name = ColumnNamePrefix + title_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + title_FIELDNAME)
@CheckPersist(allowEmpty = true)
private String title;
public static final String application_FIELDNAME = "application";
@FieldDescribe("应用.")
@Column(length = JpaObject.length_id, name = ColumnNamePrefix + application_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + application_FIELDNAME)
@CheckPersist(allowEmpty = false)
private String application;
public static final String process_FIELDNAME = "process";
@FieldDescribe("流程ID.")
@Column(length = JpaObject.length_id, name = ColumnNamePrefix + process_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + process_FIELDNAME)
@CheckPersist(allowEmpty = false)
private String process;
public static final String job_FIELDNAME = "job";
@FieldDescribe("任务.")
@Column(length = JpaObject.length_id, name = ColumnNamePrefix + job_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + job_FIELDNAME)
@CheckPersist(allowEmpty = false)
private String job;
public static final String work_FIELDNAME = "work";
@FieldDescribe("工作ID.")
@Column(length = JpaObject.length_id, name = ColumnNamePrefix + work_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + work_FIELDNAME)
@CheckPersist(allowEmpty = false)
private String work;
public static final String activity_FIELDNAME = "activity";
@FieldDescribe("活动ID.")
@Column(length = JpaObject.length_id, name = ColumnNamePrefix + activity_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + activity_FIELDNAME)
@CheckPersist(allowEmpty = false)
private String activity;
public static final String activityName_FIELDNAME = "activityName";
@FieldDescribe("活动名称.")
@Column(length = length_255B, name = ColumnNamePrefix + activityName_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + activityName_FIELDNAME)
@CheckPersist(allowEmpty = true)
private String activityName;
public static final String person_FIELDNAME = "person";
@FieldDescribe("当前处理人")
@Column(length = length_255B, name = ColumnNamePrefix + person_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + person_FIELDNAME)
@CheckPersist(allowEmpty = false)
private String person;
public static final String commitTime_FIELDNAME = "commitTime";
@Temporal(TemporalType.TIME)
@FieldDescribe("提交时间.")
@Column(name = ColumnNamePrefix + commitTime_FIELDNAME)
@Index(name = TABLE + IndexNameMiddle + commitTime_FIELDNAME)
@CheckPersist(allowEmpty = true)
private Date commitTime;
public static final String properties_FIELDNAME = "properties";
@FieldDescribe("属性对象存储字段.")
@Persistent
@Strategy(JsonPropertiesValueHandler)
@Column(length = JpaObject.length_20M, name = ColumnNamePrefix + properties_FIELDNAME)
@CheckPersist(allowEmpty = true)
private DocSignProperties properties;
public String getProcess() {
return process;
}
public void setProcess(String process) {
this.process = process;
}
public String getApplication() {
return application;
}
public void setApplication(String application) {
this.application = application;
}
public String getPerson() {
return person;
}
public void setPerson(String person) {
this.person = person;
}
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getJob() {
return job;
}
public void setJob(String job) {
this.job = job;
}
public String getWork() {
return work;
}
public void setWork(String work) {
this.work = work;
}
public String getActivity() {
return activity;
}
public void setActivity(String activity) {
this.activity = activity;
}
public String getActivityName() {
return activityName;
}
public void setActivityName(String activityName) {
this.activityName = activityName;
}
public Date getCommitTime() {
return commitTime;
}
public void setCommitTime(Date commitTime) {
this.commitTime = commitTime;
}
}
package com.x.processplatform.core.entity.content;
import com.x.base.core.entity.JsonProperties;
/**
* 文件签批扩展信息
* @author sword
*/
public class DocSignProperties extends JsonProperties {
private Data data = new Data();
private String title;
public Data getData() {
return data;
}
public void setData(Data data) {
this.data = data;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册