Просмотр исходного кода

Merge branch 'fix/cms管理员发布文档支持指定发布时间' into 'wrdp'

[内容管理]cms管理员发布文档支持指定发布时间

See merge request o2oa/o2oa!2805
o2null 5 лет назад
Родитель
Сommit
5edb276546

+ 19 - 17
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionPersistPublishByWorkFlow.java

@@ -213,7 +213,9 @@ public class ActionPersistPublishByWorkFlow extends BaseAction {
 			try {
 				JsonElement docData = XGsonBuilder.instance().toJsonTree(wi.getDocData(), Map.class);
 				wi.setDocStatus("published");
-				wi.setPublishTime(new Date());
+				if(wi.getPublishTime()==null) {
+					wi.setPublishTime(new Date());
+				}
 				document = documentPersistService.save(wi, docData);
 			} catch (Exception e) {
 				check = false;
@@ -382,7 +384,7 @@ public class ActionPersistPublishByWorkFlow extends BaseAction {
 				if( categoryInfo.getSendNotify() == null ) {
 					if( StringUtils.equals("信息", categoryInfo.getDocumentType()) ) {
 						notify = true;
-					}						
+					}
 				}else {
 					if( categoryInfo.getSendNotify() ) {
 						notify = true;
@@ -439,43 +441,43 @@ public class ActionPersistPublishByWorkFlow extends BaseAction {
 	}
 
 	public static class Wi extends Document {
-		
+
 		private static final long serialVersionUID = -5076990764713538973L;
-		
+
 		public static List<String> Excludes = new ArrayList<String>(JpaObject.FieldsUnmodify);
-		
+
 		public static WrapCopier<Wi, Document> copier = WrapCopierFactory.wi( Wi.class, Document.class, null, JpaObject.FieldsUnmodify);
 
 		@FieldDescribe( "文档操作者身份." )
 		private String identity = null;
-		
+
 		@FieldDescribe( "数据的路径列表." )
 		private String[] dataPaths = null;
-		
+
 		@FieldDescribe( "启动流程的JobId." )
 		private String wf_jobId = null;
-		
+
 		@FieldDescribe( "启动流程的WorkId." )
 		private String wf_workId = null;
-		
+
 		@FieldDescribe( "启动流程的附件列表." )
-		private String[] wf_attachmentIds = null;	
-		
+		private String[] wf_attachmentIds = null;
+
 		@FieldDescribe( "文档数据." )
 		private Map<?, ?> docData = null;
-		
+
 		@FieldDescribe( "文档读者." )
 		private List<PermissionInfo> readerList = null;
 
 		@FieldDescribe( "文档编辑者." )
 		private List<PermissionInfo> authorList = null;
-		
+
 		@FieldDescribe( "图片列表." )
 		private List<String> cloudPictures = null;
-		
+
 		@FieldDescribe( "不修改权限(跳过权限设置,保留原来的设置)." )
-		private Boolean skipPermission  = false;	
-		
+		private Boolean skipPermission  = false;
+
 		public Boolean getSkipPermission() {
 			return skipPermission;
 		}
@@ -564,4 +566,4 @@ public class ActionPersistPublishByWorkFlow extends BaseAction {
 	public static class Wo extends WoId {
 
 	}
-}
+}