roo00 hace 6 años
padre
commit
0fd9848d4e
Se han modificado 66 ficheros con 937 adiciones y 4932 borrados
  1. 5 0
      o2server/x_attendance_core_entity/src/main/java/com/x/attendance/entity/AttendanceAppealInfo.java
  2. 3 0
      o2server/x_attendance_core_entity/src/main/java/com/x/attendance/entity/AttendanceDetail.java
  3. 3 0
      o2server/x_attendance_core_entity/src/main/java/com/x/attendance/entity/AttendanceDetailMobile.java
  4. 5 0
      o2server/x_attendance_core_entity/src/main/java/com/x/attendance/entity/AttendanceImportFileInfo.java
  5. 4 0
      o2server/x_attendance_core_entity/src/main/java/com/x/attendance/entity/AttendanceSelfHoliday.java
  6. 3 0
      o2server/x_attendance_core_entity/src/main/java/com/x/attendance/entity/AttendanceStatisticRequireLog.java
  7. 4 0
      o2server/x_attendance_core_entity/src/main/java/com/x/attendance/entity/AttendanceStatisticalCycle.java
  8. 10 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/container/EntityManagerContainer.java
  9. 99 187
      o2server/x_base_core_project/src/main/java/com/x/base/core/entity/dynamic/DynamicEntity.java
  10. 20 37
      o2server/x_base_core_project/src/main/java/com/x/base/core/entity/dynamic/DynamicEntityBuilder.java
  11. 61 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Config.java
  12. 38 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Dingding.java
  13. 2 1
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Qiyeweixin.java
  14. 8 0
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/gson/XGsonBuilder.java
  15. 1 4
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_cms_assemble_control.java
  16. 8 1464
      o2server/x_base_core_project/src/test/resources/aaa.json
  17. 3 0
      o2server/x_bbs_core_entity/src/main/java/com/x/bbs/entity/BBSSubjectAttachment.java
  18. 9 0
      o2server/x_bbs_core_entity/src/main/java/com/x/bbs/entity/BBSSubjectInfo.java
  19. 4 0
      o2server/x_bbs_core_entity/src/main/java/com/x/bbs/entity/BBSUserInfo.java
  20. 1 1
      o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/jaxrs/calendar/ActionListWithCondition.java
  21. 5 0
      o2server/x_calendar_core_entity/src/main/java/com/x/calendar/core/entity/Calendar_Event.java
  22. 6 0
      o2server/x_calendar_core_entity/src/main/java/com/x/calendar/core/entity/Calendar_EventRepeatMaster.java
  23. 0 40
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/Business.java
  24. 0 3
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/ThisApplication.java
  25. 0 10
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/AppInfoFactory.java
  26. 1 11
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/CategoryInfoFactory.java
  27. 0 23
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/DocumentFactory.java
  28. 0 261
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/RescissoryClass_AppCategoryAdminFactory.java
  29. 0 336
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/RescissoryClass_AppCategoryPermissionFactory.java
  30. 0 181
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/RescissoryClass_DocumentPermissionFactory.java
  31. 0 50
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/ReviewFactory.java
  32. 2 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/ActionApplication.java
  33. 75 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/ActionGetAnonymous.java
  34. 127 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/ActionListNextWithFilterAnonymous.java
  35. 0 70
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/ActionUpdateReviewForce.java
  36. 0 20
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/AppInfoAction.java
  37. 74 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/AppInfoAnonymousAction.java
  38. 10 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/BaseAction.java
  39. 4 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/ExceptionAppInfoAccessDenied.java
  40. 105 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/ActionGetAnonymous.java
  41. 171 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/ActionListNextWithFilterAnonymous.java
  42. 0 70
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/ActionUpdateReviewForce.java
  43. 0 20
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/CategoryInfoAction.java
  44. 45 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/CategoryInfoAnonymousAction.java
  45. 19 0
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/ExceptionCategoryInfoAccessDenied.java
  46. 0 1
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/data/BaseAction.java
  47. 0 11
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionUpdateReviewForce.java
  48. 0 1
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionView.java
  49. 0 165
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/ActionTransferAllAppInfoPermission.java
  50. 0 166
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/ActionTransferAllCategoryInfoPermission.java
  51. 0 185
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/ActionTransferAllDocumentInfoPermission.java
  52. 0 8
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/BaseAction.java
  53. 1 59
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/PermissionAction.java
  54. 1 13
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/AppInfoService.java
  55. 0 14
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/AppInfoServiceAdv.java
  56. 0 13
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/CategoryInfoService.java
  57. 0 16
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/CategoryInfoServiceAdv.java
  58. 0 352
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/PermissionOperateService.java
  59. 0 192
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/RescissoryClass_AppCategoryAdminService.java
  60. 0 109
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/RescissoryClass_AppCategoryAdminServiceAdv.java
  61. 0 118
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/RescissoryClass_AppCategoryPermissionService.java
  62. 0 278
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/RescissoryClass_AppCategoryPermissionServiceAdv.java
  63. 0 237
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/RescissoryClass_DocumentPermissionService.java
  64. 0 106
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/RescissoryClass_DocumentPermissionServiceAdv.java
  65. 0 98
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/timertask/Timertask_DocumentReviewTask.java
  66. 0 1
      o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/timertask/Timertask_LogRecordCheckTask.java

+ 5 - 0
o2server/x_attendance_core_entity/src/main/java/com/x/attendance/entity/AttendanceAppealInfo.java

@@ -11,6 +11,8 @@ import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.Lob;
 import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
 import com.x.base.core.entity.AbstractPersistenceProperties;
@@ -103,6 +105,7 @@ public class AttendanceAppealInfo extends SliceJpaObject {
 	private String recordDateString;
 
 	@FieldDescribe("记录日期")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = "xrecordDate")
 	@CheckPersist(allowEmpty = true)
 	private Date recordDate;
@@ -176,6 +179,7 @@ public class AttendanceAppealInfo extends SliceJpaObject {
 	private String opinion1;
 
 	@FieldDescribe("审批日期一")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = "xprocessTime1")
 	@CheckPersist(allowEmpty = true)
 	private Date processTime1;
@@ -201,6 +205,7 @@ public class AttendanceAppealInfo extends SliceJpaObject {
 	private String opinion2;
 
 	@FieldDescribe("审批日期二")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = "xprocessTime2")
 	@CheckPersist(allowEmpty = true)
 	private Date processTime2;

+ 3 - 0
o2server/x_attendance_core_entity/src/main/java/com/x/attendance/entity/AttendanceDetail.java

@@ -11,6 +11,8 @@ import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.Lob;
 import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
 import org.apache.commons.lang3.StringUtils;
@@ -101,6 +103,7 @@ public class AttendanceDetail extends SliceJpaObject {
 	private String recordDateString;
 
 	@FieldDescribe("打卡记录日期")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = "xrecordDate")
 	@CheckPersist(allowEmpty = true)
 	private Date recordDate;

+ 3 - 0
o2server/x_attendance_core_entity/src/main/java/com/x/attendance/entity/AttendanceDetailMobile.java

@@ -8,6 +8,8 @@ import javax.persistence.Id;
 import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
 import org.apache.commons.lang3.StringUtils;
@@ -77,6 +79,7 @@ public class AttendanceDetailMobile extends SliceJpaObject {
 	private String recordDateString;
 
 	@FieldDescribe("打卡记录日期")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = "xrecordDate")
 	@CheckPersist(allowEmpty = true)
 	private Date recordDate;

+ 5 - 0
o2server/x_attendance_core_entity/src/main/java/com/x/attendance/entity/AttendanceImportFileInfo.java

@@ -13,6 +13,8 @@ import javax.persistence.Lob;
 import javax.persistence.PrePersist;
 import javax.persistence.PreUpdate;
 import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
 import org.apache.commons.lang3.StringUtils;
@@ -74,6 +76,7 @@ public class AttendanceImportFileInfo extends SliceJpaObject {
 	 */
 
 	@FieldDescribe("最后更新时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = "xlastUpdateTime")
 	@Index(name = TABLE + "_lastUpdateTime")
 	@CheckPersist(allowEmpty = false)
@@ -170,10 +173,12 @@ public class AttendanceImportFileInfo extends SliceJpaObject {
 	private Long processCount = 0L;
 
 	@FieldDescribe("数据开始日期")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = "xstartDate")
 	private Date startDate = null;
 
 	@FieldDescribe("数据结束日期")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = "xendDate")
 	private Date endDate = null;
 

+ 4 - 0
o2server/x_attendance_core_entity/src/main/java/com/x/attendance/entity/AttendanceSelfHoliday.java

@@ -10,6 +10,8 @@ import javax.persistence.InheritanceType;
 import javax.persistence.PrePersist;
 import javax.persistence.PreUpdate;
 import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
 import org.apache.commons.lang3.StringUtils;
@@ -103,11 +105,13 @@ public class AttendanceSelfHoliday extends SliceJpaObject {
 	private String leaveType;
 
 	@FieldDescribe("开始时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = "xstartTime")
 	@CheckPersist(allowEmpty = false)
 	private Date startTime;
 
 	@FieldDescribe("结束时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = "xendTime")
 	@CheckPersist(allowEmpty = false)
 	private Date endTime;

+ 3 - 0
o2server/x_attendance_core_entity/src/main/java/com/x/attendance/entity/AttendanceStatisticRequireLog.java

@@ -11,6 +11,8 @@ import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.Lob;
 import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
 import com.x.base.core.entity.JpaObject;
@@ -90,6 +92,7 @@ public class AttendanceStatisticRequireLog extends SliceJpaObject {
 	private String statisticDay = "";
 
 	@FieldDescribe("处理时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = "xprocessTime")
 	@CheckPersist(allowEmpty = true)
 	private Date processTime = null;

+ 4 - 0
o2server/x_attendance_core_entity/src/main/java/com/x/attendance/entity/AttendanceStatisticalCycle.java

@@ -8,6 +8,8 @@ import javax.persistence.Id;
 import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
 import com.x.base.core.entity.AbstractPersistenceProperties;
@@ -91,11 +93,13 @@ public class AttendanceStatisticalCycle extends SliceJpaObject {
 	private String cycleEndDateString;
 
 	@FieldDescribe("月周期开始日期")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = "xcycleStartDate")
 	@CheckPersist(allowEmpty = true)
 	private Date cycleStartDate;
 
 	@FieldDescribe("月周期结束日期")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = "xcycleEndDate")
 	@CheckPersist(allowEmpty = true)
 	private Date cycleEndDate;

+ 10 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/container/EntityManagerContainer.java

@@ -412,6 +412,16 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 		return list;
 	}
 
+	public <T extends JpaObject, W extends Object> List<T> listEqualAndGreaterThanOrEqualTo(Class<T> cls,
+			String attribute, Object value, String otherAttribute, Object otherValue) throws Exception {
+		EntityManager em = this.get(cls);
+		Query query = em.createQuery("select o from " + cls.getName() + " o where ((o." + attribute + " = ?1) and (o."
+				+ otherAttribute + " >= ?2))");
+		query.setParameter(1, value);
+		query.setParameter(2, otherValue);
+		return new ArrayList<T>(query.getResultList());
+	}
+
 	public <T extends JpaObject> Long count(Class<T> cls) throws Exception {
 		EntityManager em = this.get(cls);
 		CriteriaBuilder cb = em.getCriteriaBuilder();

+ 99 - 187
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/dynamic/DynamicEntity.java

@@ -2,6 +2,7 @@ package com.x.base.core.entity.dynamic;
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.stream.Collectors;
 
 import org.apache.commons.lang3.StringUtils;
 
@@ -15,33 +16,27 @@ public class DynamicEntity extends GsonPropertyObject {
 	public static final String FIELDNAME_SUFFIX = "_FIELDNAME";
 	public static final String JAR_NAME = "x_query_dynamic_entity";
 
+	public static final String TYPE_string = "string";
+	public static final String TYPE_integer = "integer";
+	public static final String TYPE_long = "long";
+	public static final String TYPE_double = "double";
+	public static final String TYPE_boolean = "boolean";
+	public static final String TYPE_date = "date";
+	public static final String TYPE_time = "time";
+	public static final String TYPE_dateTime = "dateTime";
+
+	public static final String TYPE_stringList = "stringList";
+	public static final String TYPE_integerList = "integerList";
+	public static final String TYPE_longList = "longList";
+	public static final String TYPE_doubleList = "doubleList";
+	public static final String TYPE_booleanList = "booleanList";
+
+	public static final String TYPE_stringLob = "stringLob";
+	public static final String TYPE_stringMap = "stringMap";
+
 	private String name;
 
-	private List<StringField> stringFieldList;
-	private List<IntegerField> integerFieldList;
-	private List<LongField> longFieldList;
-	private List<DoubleField> doubleFieldList;
-	private List<BooleanField> booleanFieldList;
-	private List<DateField> dateFieldList;
-	private List<TimeField> timeFieldList;
-	private List<DateTimeField> dateTimeFieldList;
-
-	private List<StringField> listStringFieldList;
-	private List<IntegerField> listIntegerFieldList;
-	private List<LongField> listLongFieldList;
-	private List<DoubleField> listDoubleFieldList;
-	private List<BooleanField> listBooleanFieldList;
-	private List<DateTimeField> listDateTimeFieldList;
-
-	private List<StringLobField> stringLobFieldList;
-	private List<StringMapField> stringMapFieldList;
-
-	public void addStringField(String name, String description) {
-		StringField field = new StringField();
-		field.setName(name);
-		field.setDescription(description);
-		this.stringFieldList.add(field);
-	}
+	private List<Field> fieldList = new ArrayList<>();
 
 	public String tableName() throws Exception {
 		if (StringUtils.isEmpty(name)) {
@@ -70,24 +65,7 @@ public class DynamicEntity extends GsonPropertyObject {
 	}
 
 	public DynamicEntity() {
-		this.stringFieldList = new ArrayList<>();
-		this.integerFieldList = new ArrayList<>();
-		this.longFieldList = new ArrayList<>();
-		this.doubleFieldList = new ArrayList<>();
-		this.booleanFieldList = new ArrayList<>();
-		this.dateFieldList = new ArrayList<>();
-		this.timeFieldList = new ArrayList<>();
-		this.dateTimeFieldList = new ArrayList<>();
-
-		this.listStringFieldList = new ArrayList<>();
-		this.listIntegerFieldList = new ArrayList<>();
-		this.listLongFieldList = new ArrayList<>();
-		this.listDoubleFieldList = new ArrayList<>();
-		this.listBooleanFieldList = new ArrayList<>();
-		this.listDateTimeFieldList = new ArrayList<>();
-
-		this.stringLobFieldList = new ArrayList<>();
-		this.stringMapFieldList = new ArrayList<>();
+		this.fieldList = new ArrayList<>();
 	}
 
 	public DynamicEntity(String name) {
@@ -95,195 +73,129 @@ public class DynamicEntity extends GsonPropertyObject {
 		this.name = name;
 	}
 
-	public static abstract class Field {
-		private String name;
-		private String description;
-
-		public String fieldName() {
-			return this.name + FIELDNAME_SUFFIX;
-		}
-
-		public String getName() {
-			return name;
-		}
-
-		public void setName(String name) {
-			this.name = name;
-		}
-
-		public String getDescription() {
-			return description;
-		}
-
-		public void setDescription(String description) {
-			this.description = description;
-		}
-	}
-
-	public static class StringField extends Field {
-	}
-
-	public static class IntegerField extends Field {
-	}
-
-	public static class LongField extends Field {
-	}
-
-	public static class DoubleField extends Field {
-	}
-
-	public static class BooleanField extends Field {
-	}
-
-	public static class DateField extends Field {
-	}
-
-	public static class TimeField extends Field {
-	}
-
-	public static class DateTimeField extends Field {
-	}
-
-	public static class StringLobField extends Field {
-	}
-
-	public static class StringMapField extends Field {
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public List<StringField> getStringFieldList() {
-		return stringFieldList;
-	}
-
-	public void setStringFieldList(List<StringField> stringFieldList) {
-		this.stringFieldList = stringFieldList;
-	}
-
-	public List<IntegerField> getIntegerFieldList() {
-		return integerFieldList;
+	public List<Field> stringFields() {
+		return this.fieldList.stream().filter(o -> StringUtils.equals(o.getType(), TYPE_string))
+				.collect(Collectors.toList());
 	}
 
-	public void setIntegerFieldList(List<IntegerField> integerFieldList) {
-		this.integerFieldList = integerFieldList;
+	public List<Field> integerFields() {
+		return this.fieldList.stream().filter(o -> StringUtils.equals(o.getType(), TYPE_integer))
+				.collect(Collectors.toList());
 	}
 
-	public List<LongField> getLongFieldList() {
-		return longFieldList;
+	public List<Field> longFields() {
+		return this.fieldList.stream().filter(o -> StringUtils.equals(o.getType(), TYPE_long))
+				.collect(Collectors.toList());
 	}
 
-	public void setLongFieldList(List<LongField> longFieldList) {
-		this.longFieldList = longFieldList;
+	public List<Field> doubleFields() {
+		return this.fieldList.stream().filter(o -> StringUtils.equals(o.getType(), TYPE_double))
+				.collect(Collectors.toList());
 	}
 
-	public List<DoubleField> getDoubleFieldList() {
-		return doubleFieldList;
+	public List<Field> booleanFields() {
+		return this.fieldList.stream().filter(o -> StringUtils.equals(o.getType(), TYPE_boolean))
+				.collect(Collectors.toList());
 	}
 
-	public void setDoubleFieldList(List<DoubleField> doubleFieldList) {
-		this.doubleFieldList = doubleFieldList;
+	public List<Field> dateFields() {
+		return this.fieldList.stream().filter(o -> StringUtils.equals(o.getType(), TYPE_date))
+				.collect(Collectors.toList());
 	}
 
-	public List<BooleanField> getBooleanFieldList() {
-		return booleanFieldList;
+	public List<Field> timeFields() {
+		return this.fieldList.stream().filter(o -> StringUtils.equals(o.getType(), TYPE_time))
+				.collect(Collectors.toList());
 	}
 
-	public void setBooleanFieldList(List<BooleanField> booleanFieldList) {
-		this.booleanFieldList = booleanFieldList;
+	public List<Field> dateTimeFields() {
+		return this.fieldList.stream().filter(o -> StringUtils.equals(o.getType(), TYPE_dateTime))
+				.collect(Collectors.toList());
 	}
 
-	public List<DateField> getDateFieldList() {
-		return dateFieldList;
+	public List<Field> stringListFields() {
+		return this.fieldList.stream().filter(o -> StringUtils.equals(o.getType(), TYPE_stringList))
+				.collect(Collectors.toList());
 	}
 
-	public void setDateFieldList(List<DateField> dateFieldList) {
-		this.dateFieldList = dateFieldList;
+	public List<Field> integerListFields() {
+		return this.fieldList.stream().filter(o -> StringUtils.equals(o.getType(), TYPE_integerList))
+				.collect(Collectors.toList());
 	}
 
-	public List<TimeField> getTimeFieldList() {
-		return timeFieldList;
+	public List<Field> longListFields() {
+		return this.fieldList.stream().filter(o -> StringUtils.equals(o.getType(), TYPE_longList))
+				.collect(Collectors.toList());
 	}
 
-	public void setTimeFieldList(List<TimeField> timeFieldList) {
-		this.timeFieldList = timeFieldList;
+	public List<Field> doubleListFields() {
+		return this.fieldList.stream().filter(o -> StringUtils.equals(o.getType(), TYPE_doubleList))
+				.collect(Collectors.toList());
 	}
 
-	public List<DateTimeField> getDateTimeFieldList() {
-		return dateTimeFieldList;
+	public List<Field> booleanListFields() {
+		return this.fieldList.stream().filter(o -> StringUtils.equals(o.getType(), TYPE_booleanList))
+				.collect(Collectors.toList());
 	}
 
-	public void setDateTimeFieldList(List<DateTimeField> dateTimeFieldList) {
-		this.dateTimeFieldList = dateTimeFieldList;
+	public List<Field> stringLobFields() {
+		return this.fieldList.stream().filter(o -> StringUtils.equals(o.getType(), TYPE_stringLob))
+				.collect(Collectors.toList());
 	}
 
-	public List<StringField> getListStringFieldList() {
-		return listStringFieldList;
+	public List<Field> stringMapFields() {
+		return this.fieldList.stream().filter(o -> StringUtils.equals(o.getType(), TYPE_stringMap))
+				.collect(Collectors.toList());
 	}
 
-	public void setListStringFieldList(List<StringField> listStringFieldList) {
-		this.listStringFieldList = listStringFieldList;
-	}
-
-	public List<IntegerField> getListIntegerFieldList() {
-		return listIntegerFieldList;
-	}
-
-	public void setListIntegerFieldList(List<IntegerField> listIntegerFieldList) {
-		this.listIntegerFieldList = listIntegerFieldList;
-	}
-
-	public List<LongField> getListLongFieldList() {
-		return listLongFieldList;
-	}
+	public static class Field {
+		private String name;
+		private String description;
+		private String type;
 
-	public void setListLongFieldList(List<LongField> listLongFieldList) {
-		this.listLongFieldList = listLongFieldList;
-	}
+		public String fieldName() {
+			return this.name + FIELDNAME_SUFFIX;
+		}
 
-	public List<DoubleField> getListDoubleFieldList() {
-		return listDoubleFieldList;
-	}
+		public String getName() {
+			return name;
+		}
 
-	public void setListDoubleFieldList(List<DoubleField> listDoubleFieldList) {
-		this.listDoubleFieldList = listDoubleFieldList;
-	}
+		public void setName(String name) {
+			this.name = name;
+		}
 
-	public List<BooleanField> getListBooleanFieldList() {
-		return listBooleanFieldList;
-	}
+		public String getDescription() {
+			return description;
+		}
 
-	public void setListBooleanFieldList(List<BooleanField> listBooleanFieldList) {
-		this.listBooleanFieldList = listBooleanFieldList;
-	}
+		public void setDescription(String description) {
+			this.description = description;
+		}
 
-	public List<DateTimeField> getListDateTimeFieldList() {
-		return listDateTimeFieldList;
-	}
+		public String getType() {
+			return type;
+		}
 
-	public void setListDateTimeFieldList(List<DateTimeField> listDateTimeFieldList) {
-		this.listDateTimeFieldList = listDateTimeFieldList;
+		public void setType(String type) {
+			this.type = type;
+		}
 	}
 
-	public List<StringLobField> getStringLobFieldList() {
-		return stringLobFieldList;
+	public String getName() {
+		return name;
 	}
 
-	public void setStringLobFieldList(List<StringLobField> stringLobFieldList) {
-		this.stringLobFieldList = stringLobFieldList;
+	public void setName(String name) {
+		this.name = name;
 	}
 
-	public List<StringMapField> getStringMapFieldList() {
-		return stringMapFieldList;
+	public List<Field> getFieldList() {
+		return fieldList;
 	}
 
-	public void setStringMapFieldList(List<StringMapField> stringMapFieldList) {
-		this.stringMapFieldList = stringMapFieldList;
+	public void setFieldList(List<Field> fieldList) {
+		this.fieldList = fieldList;
 	}
 
 }

+ 20 - 37
o2server/x_base_core_project/src/main/java/com/x/base/core/entity/dynamic/DynamicEntityBuilder.java

@@ -39,17 +39,7 @@ 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.entity.dynamic.DynamicEntity.BooleanField;
-import com.x.base.core.entity.dynamic.DynamicEntity.DateField;
-import com.x.base.core.entity.dynamic.DynamicEntity.DateTimeField;
-import com.x.base.core.entity.dynamic.DynamicEntity.DoubleField;
 import com.x.base.core.entity.dynamic.DynamicEntity.Field;
-import com.x.base.core.entity.dynamic.DynamicEntity.IntegerField;
-import com.x.base.core.entity.dynamic.DynamicEntity.LongField;
-import com.x.base.core.entity.dynamic.DynamicEntity.StringField;
-import com.x.base.core.entity.dynamic.DynamicEntity.StringLobField;
-import com.x.base.core.entity.dynamic.DynamicEntity.StringMapField;
-import com.x.base.core.entity.dynamic.DynamicEntity.TimeField;
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.tools.ListTools;
 
@@ -111,7 +101,6 @@ public class DynamicEntityBuilder {
 		this.createListLongFields(builder);
 		this.createListDoubleFields(builder);
 		this.createListBooleanFields(builder);
-		this.createListDateTimeFields(builder);
 		this.createStringLobFields(builder);
 		this.createStringMapFields(builder);
 
@@ -155,31 +144,31 @@ public class DynamicEntityBuilder {
 	}
 
 	private void createStringFields(Builder builder) {
-		for (StringField field : ListTools.trim(dynamicEntity.getStringFieldList(), true, true)) {
+		for (Field field : ListTools.trim(dynamicEntity.stringFields(), true, true)) {
 			this.createField(builder, field, String.class);
 		}
 	}
 
 	private void createIntegerFields(Builder builder) {
-		for (IntegerField field : ListTools.trim(dynamicEntity.getIntegerFieldList(), true, true)) {
+		for (Field field : ListTools.trim(dynamicEntity.integerFields(), true, true)) {
 			this.createField(builder, field, Integer.class);
 		}
 	}
 
 	private void createLongFields(Builder builder) {
-		for (LongField field : ListTools.trim(dynamicEntity.getLongFieldList(), true, true)) {
+		for (Field field : ListTools.trim(dynamicEntity.longFields(), true, true)) {
 			this.createField(builder, field, Long.class);
 		}
 	}
 
 	private void createDoubleFields(Builder builder) {
-		for (DoubleField field : ListTools.trim(dynamicEntity.getDoubleFieldList(), true, true)) {
+		for (Field field : ListTools.trim(dynamicEntity.doubleFields(), true, true)) {
 			this.createField(builder, field, Double.class);
 		}
 	}
 
 	private void createBooleanFields(Builder builder) {
-		for (BooleanField field : ListTools.trim(dynamicEntity.getBooleanFieldList(), true, true)) {
+		for (Field field : ListTools.trim(dynamicEntity.booleanFields(), true, true)) {
 			this.createField(builder, field, Boolean.class);
 		}
 	}
@@ -214,12 +203,12 @@ public class DynamicEntityBuilder {
 	}
 
 	private void createDateFields(Builder builder) {
-		for (DateField field : ListTools.trim(dynamicEntity.getDateFieldList(), true, true)) {
+		for (Field field : ListTools.trim(dynamicEntity.dateFields(), true, true)) {
 			this.createDateField(builder, field);
 		}
 	}
 
-	private void createDateField(Builder builder, DateField field) {
+	private void createDateField(Builder builder, Field field) {
 
 		AnnotationSpec column = AnnotationSpec.builder(Column.class)
 				.addMember("name", "ColumnNamePrefix + " + field.fieldName()).build();
@@ -240,12 +229,12 @@ public class DynamicEntityBuilder {
 	}
 
 	private void createTimeFields(Builder builder) {
-		for (TimeField field : ListTools.trim(dynamicEntity.getTimeFieldList(), true, true)) {
+		for (Field field : ListTools.trim(dynamicEntity.timeFields(), true, true)) {
 			this.createTimeField(builder, field);
 		}
 	}
 
-	private void createTimeField(Builder builder, TimeField field) {
+	private void createTimeField(Builder builder, Field field) {
 
 		AnnotationSpec column = AnnotationSpec.builder(Column.class)
 				.addMember("name", "ColumnNamePrefix + " + field.fieldName()).build();
@@ -267,12 +256,12 @@ public class DynamicEntityBuilder {
 	}
 
 	private void createDateTimeFields(Builder builder) {
-		for (DateTimeField field : ListTools.trim(dynamicEntity.getDateTimeFieldList(), true, true)) {
+		for (Field field : ListTools.trim(dynamicEntity.dateTimeFields(), true, true)) {
 			this.createDateTimeField(builder, field);
 		}
 	}
 
-	private void createDateTimeField(Builder builder, DateTimeField field) {
+	private void createDateTimeField(Builder builder, Field field) {
 
 		AnnotationSpec column = AnnotationSpec.builder(Column.class)
 				.addMember("name", "ColumnNamePrefix + " + field.fieldName()).build();
@@ -294,41 +283,35 @@ public class DynamicEntityBuilder {
 	}
 
 	private void createListStringFields(Builder builder) {
-		for (StringField field : ListTools.trim(dynamicEntity.getListStringFieldList(), true, true)) {
+		for (Field field : ListTools.trim(dynamicEntity.stringListFields(), true, true)) {
 			this.createListFields(builder, field, String.class);
 		}
 	}
 
 	private void createListIntegerFields(Builder builder) {
-		for (IntegerField field : ListTools.trim(dynamicEntity.getListIntegerFieldList(), true, true)) {
+		for (Field field : ListTools.trim(dynamicEntity.integerListFields(), true, true)) {
 			this.createListFields(builder, field, Integer.class);
 		}
 	}
 
 	private void createListLongFields(Builder builder) {
-		for (LongField field : ListTools.trim(dynamicEntity.getListLongFieldList(), true, true)) {
+		for (Field field : ListTools.trim(dynamicEntity.longListFields(), true, true)) {
 			this.createListFields(builder, field, Long.class);
 		}
 	}
 
 	private void createListDoubleFields(Builder builder) {
-		for (DoubleField field : ListTools.trim(dynamicEntity.getListDoubleFieldList(), true, true)) {
+		for (Field field : ListTools.trim(dynamicEntity.doubleListFields(), true, true)) {
 			this.createListFields(builder, field, Double.class);
 		}
 	}
 
 	private void createListBooleanFields(Builder builder) {
-		for (BooleanField field : ListTools.trim(dynamicEntity.getListBooleanFieldList(), true, true)) {
+		for (Field field : ListTools.trim(dynamicEntity.booleanListFields(), true, true)) {
 			this.createListFields(builder, field, Boolean.class);
 		}
 	}
 
-	private void createListDateTimeFields(Builder builder) {
-		for (DateTimeField field : ListTools.trim(dynamicEntity.getListDateTimeFieldList(), true, true)) {
-			this.createListFields(builder, field, Date.class);
-		}
-	}
-
 	private void createListFields(Builder builder, Field field, Class<?> typeClass) {
 
 //		public static final String groupList_FIELDNAME = "groupList";
@@ -385,12 +368,12 @@ public class DynamicEntityBuilder {
 	}
 
 	private void createStringLobFields(Builder builder) {
-		for (StringLobField field : ListTools.trim(dynamicEntity.getStringLobFieldList(), true, true)) {
+		for (Field field : ListTools.trim(dynamicEntity.stringLobFields(), true, true)) {
 			this.createStringLobField(builder, field);
 		}
 	}
 
-	private void createStringLobField(Builder builder, StringLobField field) {
+	private void createStringLobField(Builder builder, Field field) {
 
 //		public static final String stringLobValue_FIELDNAME = "stringLobValue";
 //		@FieldDescribe("长文本.")
@@ -420,12 +403,12 @@ public class DynamicEntityBuilder {
 	}
 
 	private void createStringMapFields(Builder builder) {
-		for (StringMapField field : ListTools.trim(dynamicEntity.getStringMapFieldList(), true, true)) {
+		for (Field field : ListTools.trim(dynamicEntity.stringMapFields(), true, true)) {
 			this.createStringMapField(builder, field);
 		}
 	}
 
-	private void createStringMapField(Builder builder, StringMapField field) {
+	private void createStringMapField(Builder builder, Field field) {
 
 //		@FieldDescribe("Map类型.")
 //		@CheckPersist(allowEmpty = true)

+ 61 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Config.java

@@ -61,6 +61,7 @@ public class Config {
 	public static final String PATH_CONFIG_ZHENGWUDINGDING = "config/zhengwuDingding.json";
 	public static final String PATH_CONFIG_QIYEWEIXIN = "config/qiyeweixin.json";
 	public static final String PATH_CONFIG_LOGLEVEL = "config/logLevel.json";
+	public static final String PATH_CONFIG_BINDLOGO = "config/bindLogo.png";
 	public static final String PATH_COMMONS_INITIALSCRIPTTEXT = "commons/initialScriptText.js";
 	public static final String PATH_COMMONS_MOOTOOLSSCRIPTTEXT = "commons/mooToolsScriptText.js";
 
@@ -102,6 +103,48 @@ public class Config {
 	private static final String DEFAULT_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCWcVZIS57VeOUzi8c01WKvwJK9uRe6hrGTUYmF6J/pI6/UvCbdBWCoErbzsBZOElOH8Sqal3vsNMVLjPYClfoDyYDaUlakP3ldfnXJzAFJVVubF53KadG+fwnh9ZMvxdh7VXVqRL3IQBDwGgzX4rmSK+qkUJjc3OkrNJPB7LLD8QIDAQAB";
 	private static final String DEFAULT_PRIVATE_KEY = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAJZxVkhLntV45TOLxzTVYq/Akr25F7qGsZNRiYXon+kjr9S8Jt0FYKgStvOwFk4SU4fxKpqXe+w0xUuM9gKV+gPJgNpSVqQ/eV1+dcnMAUlVW5sXncpp0b5/CeH1ky/F2HtVdWpEvchAEPAaDNfiuZIr6qRQmNzc6Ss0k8HsssPxAgMBAAECgYAWtRy05NUgm5Lc6Og0jVDL/mEnydxPBy2ectwzHh2k7wIHNi8XhUxFki2TMqzrM9Dv3/LySpMl4AE3mhs34LNPy6F+MwyF5X7j+2Y6MflJyeb9HNyT++viysQneoOEiOk3ghxF2/GPjpiEF79wSp+1YKTxRAyq7ypV3t35fGOOEQJBANLDPWl8b5c3lrcz/dTamMjHbVamEyX43yzQOphzkhYsz4pruATzTxU+z8/zPdEqHcWWV39CP3xu3EYNcAhxJW8CQQC2u7PF5Xb1xYRCsmIPssFxil64vvdUadSxl7GLAgjQ9ULyYWB24KObCEzLnPcT8Pf2Q0YQOixxa/78FuzmgbyfAkA7ZFFV/H7lugB6t+f7p24OhkRFep9CwBMD6dnZRBgSr6X8d8ZvfrD2Z7DgBMeSva+OEoOtlNmXExZ3lynO9zN5AkAVczEmIMp3DSl6XtAuAZC9kD2QODJ2QToLYsAfjiyUwsWKCC43piTuVOoW2KUUPSwOR1VZIEsJQWEcHGDQqhgHAkAeZ7a6dVRZFdBwKA0ADjYCufAW2cIYiVDQBJpgB+kiLQflusNOCBK0FT3lg8BdUSy2D253Ih6l3lbaM/4M7DFQ";
 
+	private static final byte[] DEFAULT_BINDLOGO = new byte[] { -119, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72,
+			68, 82, 0, 0, 0, 64, 0, 0, 0, 64, 8, 6, 0, 0, 0, -86, 105, 113, -34, 0, 0, 0, 4, 103, 65, 77, 65, 0, 0, -79,
+			-113, 11, -4, 97, 5, 0, 0, 0, 32, 99, 72, 82, 77, 0, 0, 122, 38, 0, 0, -128, -124, 0, 0, -6, 0, 0, 0, -128,
+			-24, 0, 0, 117, 48, 0, 0, -22, 96, 0, 0, 58, -104, 0, 0, 23, 112, -100, -70, 81, 60, 0, 0, 0, 6, 98, 75, 71,
+			68, 0, 0, 0, 0, 0, 0, -7, 67, -69, 127, 0, 0, 0, 9, 112, 72, 89, 115, 0, 0, 11, 18, 0, 0, 11, 18, 1, -46,
+			-35, 126, -4, 0, 0, 3, 36, 73, 68, 65, 84, 120, -38, -19, -101, -51, 79, 19, 65, 24, -58, -97, 89, 49, -107,
+			-125, -75, 74, 37, 86, 69, 18, 67, -62, 87, -119, 7, 77, -76, -127, -58, -125, 127, 0, -31, 35, 106, 60,
+			-101, 72, 52, 24, 14, 4, 57, 122, -82, 112, -63, 24, 76, -4, 7, -60, -92, -59, -60, -77, 94, 10, 42, 28,
+			-107, 34, 120, 48, -126, 32, 6, -86, -108, 30, -124, 30, -24, 122, 104, 119, 83, 118, 27, 29, 103, 63, -34,
+			118, 119, 127, -57, -39, -39, -23, -13, 60, -23, -68, -99, -66, -39, 101, 40, 65, -106, -27, 65, 0, 93, 0,
+			-94, 0, 66, 112, 22, 27, 0, -110, 0, 102, 24, 99, -113, -107, 65, 86, 52, 30, 0, -16, 20, -64, 13, 106,
+			-107, 54, 49, 5, 96, -128, 49, -106, 81, 2, 120, -18, 34, -13, 106, 8, -116, -79, -101, -84, -8, -75, -97,
+			-96, 86, 67, -60, -3, 26, 20, -10, -68, -54, -20, -89, 77, -116, 37, 82, 72, 103, 115, -44, -30, 76, 37,
+			-24, -9, 97, -72, -73, 29, -99, -83, -11, -91, -61, 93, 18, 10, 5, 79, -59, -119, -26, 1, 32, -99, -51, 97,
+			44, -111, -46, 14, 71, 37, 104, -86, -67, 19, -51, -1, -59, 91, 72, -94, 22, 69, -115, 23, 0, -75, 0, 106,
+			106, 120, 39, 62, 27, -116, -96, -27, -20, 49, 106, -67, 92, 44, -81, 103, 113, 123, -30, 45, -41, 92, -18,
+			111, 64, -75, -104, 7, -128, -26, 51, 126, -18, -71, -82, -33, 2, -36, 1, 124, -8, -70, 77, -83, -43, 18,
+			-72, 107, -64, -67, -55, 57, 106, -83, 101, 9, -6, 125, 24, -23, 11, 35, -46, 114, 82, -24, -2, -86, -33, 2,
+			-23, 108, 14, -79, -8, -126, -16, -3, 85, 31, -128, 18, -126, -85, 3, 48, -126, -124, 66, -89, 68, 37, -24,
+			-9, 81, 107, -78, 61, -128, 100, -23, -64, 104, 127, 7, 66, 39, 106, -87, 117, -39, 70, 13, -128, 25, 0,
+			-41, -107, -127, -53, -51, 65, -68, 120, 112, -107, 90, 87, 89, 22, 87, 51, -72, -13, -28, -67, -87, 107,
+			74, -59, 6, -31, 20, -75, 57, 30, -38, -50, 5, 76, 95, -45, 43, -126, -59, -98, -96, -37, 26, -94, 42, -70,
+			-98, -32, -69, -91, 45, 60, 74, -92, -80, -75, -77, 7, 0, 56, 117, -68, 22, -93, -3, 97, 92, 108, -86, -125,
+			118, -34, -40, 116, 10, -101, -103, 61, -31, 15, -105, 36, -122, 75, 77, 117, 120, 120, -21, 2, -114, -42,
+			30, 46, -67, 116, -115, 49, -10, 6, 0, 100, 89, -106, -83, 12, 64, -41, 19, -116, -59, 23, 84, -13, 0, -16,
+			99, 123, -73, 92, 47, 13, -79, -8, -126, 33, -13, 0, -112, -49, -53, -104, -1, -100, 70, 124, 118, 69, 123,
+			41, 42, -78, -98, 104, 0, -1, -20, 9, -82, -3, -4, -83, 27, 51, -77, 119, -8, -3, -41, -82, 118, -24, -68,
+			-99, 1, -72, 26, -31, 0, -22, 3, 71, -88, -75, -45, 6, 48, -46, 27, 118, -60, -119, -111, -69, 31, -96, -27,
+			127, 79, -116, -5, 121, 25, -29, -45, -117, 120, 53, -1, -115, -38, -13, 1, 108, -85, 1, -121, 36, -122,
+			-114, -58, 0, -75, 95, -70, 0, 42, 21, -37, 2, -40, -49, -53, -8, -72, -110, -95, -10, -85, 67, -72, 6, -52,
+			45, -89, 49, -2, 50, -123, 13, -3, 111, 120, 85, 33, 28, 64, 44, 97, -4, 36, 88, 9, 8, 111, 1, 39, -104, 55,
+			20, -128, 83, -88, -120, 0, 78, -21, 15, 84, 95, -20, -6, 108, -31, 26, 96, 6, -54, -33, -31, -66, -50, 70,
+			-19, -91, -92, -56, 122, 21, 17, -64, -28, -35, 43, 8, 27, 63, -16, -68, -74, -72, 13, -96, 98, -6, 22, 48,
+			-63, -68, -83, 84, 68, 13, 112, 84, 0, -117, -85, 25, -53, -60, 90, -79, -74, -23, 53, -64, -20, -66, -67,
+			-43, 120, 91, -128, 90, 0, 53, 94, 0, -62, 55, 50, 70, -83, -35, 20, 45, -62, 1, -12, 68, 26, 42, 34, 4,
+			-119, 49, -12, 68, 26, -124, -17, 23, -2, 21, 24, -22, 110, -61, 80, 119, 27, -75, 127, -61, 120, 53, -128,
+			90, 0, 53, -36, 1, 44, -81, 103, -87, -75, 114, -77, -76, -74, -61, 61, -105, -69, 6, -16, 62, 123, 91, 109,
+			120, 91, -128, 90, 0, 53, 94, 0, 112, -47, 115, -126, 101, -68, 109, -24, -98, 19, 28, -18, 109, 119, 100,
+			8, -54, 107, 115, 26, -110, -82, 127, 113, -46, -11, -81, -50, 42, 69, 112, 0, 85, -14, -80, -92, 89, -26,
+			-117, -98, 113, -32, -17, -100, 27, 95, -97, -1, 3, 15, 32, -32, 95, -60, -127, 21, 87, 0, 0, 0, 0, 73, 69,
+			78, 68, -82, 66, 96, -126 };
+
 	public static File dir_commons() throws Exception {
 		return new File(base(), DIR_COMMONS);
 	}
@@ -1045,4 +1088,22 @@ public class Config {
 		return instance().logLevel;
 	}
 
+	private byte[] bindLogo;
+
+	public static byte[] bindLogo() throws Exception {
+		if (null == instance().bindLogo) {
+			synchronized (Config.class) {
+				if (null == instance().bindLogo) {
+					File file = new File(Config.base(), PATH_CONFIG_BINDLOGO);
+					if (file.exists() && file.isFile()) {
+						instance().bindLogo = FileUtils.readFileToByteArray(file);
+					} else {
+						instance().bindLogo = DEFAULT_BINDLOGO;
+					}
+				}
+			}
+		}
+		return instance().bindLogo;
+	}
+
 }

+ 38 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Dingding.java

@@ -48,6 +48,7 @@ public class Dingding extends ConfigObject {
 
 	public static final Boolean default_enable = false;
 	public static final String default_appKey = "";
+	public static final String default_corpId = "";
 	public static final String default_appSecret = "";
 	public static final String default_agentId = "";
 	public static final String default_syncCron = "10 0/10 * * * ?";
@@ -57,6 +58,7 @@ public class Dingding extends ConfigObject {
 
 	public Dingding() {
 		this.enable = default_enable;
+		this.corpId = default_corpId;
 		this.appKey = default_appKey;
 		this.appSecret = default_appSecret;
 		this.agentId = default_agentId;
@@ -192,4 +194,40 @@ public class Dingding extends ConfigObject {
 		FileUtils.write(file, XGsonBuilder.toJson(this), DefaultCharset.charset);
 	}
 
+	public void setEnable(Boolean enable) {
+		this.enable = enable;
+	}
+
+	public void setCorpId(String corpId) {
+		this.corpId = corpId;
+	}
+
+	public void setAgentId(String agentId) {
+		this.agentId = agentId;
+	}
+
+	public void setAppKey(String appKey) {
+		this.appKey = appKey;
+	}
+
+	public void setAppSecret(String appSecret) {
+		this.appSecret = appSecret;
+	}
+
+	public void setSyncCron(String syncCron) {
+		this.syncCron = syncCron;
+	}
+
+	public void setForceSyncCron(String forceSyncCron) {
+		this.forceSyncCron = forceSyncCron;
+	}
+
+	public void setOapiAddress(String oapiAddress) {
+		this.oapiAddress = oapiAddress;
+	}
+
+	public void setMessageEnable(Boolean messageEnable) {
+		this.messageEnable = messageEnable;
+	}
+
 }

+ 2 - 1
o2server/x_base_core_project/src/main/java/com/x/base/core/project/config/Qiyeweixin.java

@@ -10,6 +10,7 @@ import org.apache.commons.lang3.StringUtils;
 
 import com.x.base.core.project.annotation.FieldDescribe;
 import com.x.base.core.project.connection.HttpConnection;
+import com.x.base.core.project.gson.GsonPropertyObject;
 import com.x.base.core.project.gson.XGsonBuilder;
 import com.x.base.core.project.tools.DefaultCharset;
 
@@ -141,7 +142,7 @@ public class Qiyeweixin extends ConfigObject {
 		this.apiAddress = oapiAddress;
 	}
 
-	public static class CorpAccessTokenResp {
+	public static class CorpAccessTokenResp extends GsonPropertyObject {
 
 		// {"":7200,"":"ok","":"1601c97b17893fbfa4218ce2151a0692","":0}
 

+ 8 - 0
o2server/x_base_core_project/src/main/java/com/x/base/core/project/gson/XGsonBuilder.java

@@ -130,6 +130,14 @@ public class XGsonBuilder {
 		return null;
 	}
 
+	public static <T> T extract(JsonElement jsonElement, String name, Class<T> cls, T defaultValue) {
+		JsonElement element = extract(jsonElement, name);
+		if (element == null || element.isJsonNull()) {
+			return defaultValue;
+		}
+		return instance().fromJson(element, cls);
+	}
+
 	public static boolean isJson(String json) {
 		if (StringUtils.isBlank(json)) {
 			return false;

+ 1 - 4
o2server/x_base_core_project/src/main/java/com/x/base/core/project/x_cms_assemble_control.java

@@ -28,13 +28,10 @@ public class x_cms_assemble_control extends AssembleA {
 		dependency.containerEntities.add("com.x.cms.core.entity.element.File");
 		dependency.containerEntities.add("com.x.cms.core.entity.FileInfo");
 		dependency.containerEntities.add("com.x.cms.core.entity.Log");
-		dependency.containerEntities.add("com.x.cms.core.entity.Review");
 		dependency.containerEntities.add("com.x.processplatform.core.entity.content.Attachment");
 		dependency.containerEntities.add("com.x.query.core.entity.Item");
 		dependency.containerEntities.add("com.x.query.core.entity.View");
-		dependency.containerEntities.add("com.x.cms.core.entity.AppCategoryAdmin");
-		dependency.containerEntities.add("com.x.cms.core.entity.AppCategoryPermission");
-		dependency.containerEntities.add("com.x.cms.core.entity.DocumentPermission");
+		dependency.containerEntities.add("com.x.cms.core.entity.ReadRemind");
 
 		dependency.storageTypes.add(StorageType.cms.toString());
 		dependency.storageTypes.add(StorageType.processPlatform.toString());

+ 8 - 1464
o2server/x_base_core_project/src/test/resources/aaa.json

@@ -1,1464 +1,8 @@
-[
-  {
-    "createTime": "2017-03-06 15:46:28",
-    "updateTime": "2017-03-06 15:46:28",
-    "sequence": "20170306154628ea374aa0-2c67-4ab5-b422-1fdcf9308be5",
-    "id": "ea374aa0-2c67-4ab5-b422-1fdcf9308be5",
-    "path0": "",
-    "path1": "",
-    "path2": "",
-    "path3": "",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": -1,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "o",
-    "itemPrimitiveType": "u",
-    "itemStringValueType": "u",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 864
-  },
-  {
-    "createTime": "2017-03-06 15:50:14",
-    "updateTime": "2017-03-06 15:50:14",
-    "sequence": "20170306155014e68cee34-19ce-4995-9b48-a7149671912f",
-    "id": "e68cee34-19ce-4995-9b48-a7149671912f",
-    "path0": "publishFor",
-    "path1": "",
-    "path2": "",
-    "path3": "",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": -1,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "o",
-    "itemPrimitiveType": "u",
-    "itemStringValueType": "u",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 38
-  },
-  {
-    "createTime": "2017-03-06 15:50:14",
-    "updateTime": "2017-03-06 15:50:14",
-    "sequence": "201703061550149fba35d5-d6a2-49b8-a5df-e3845b1c00c2",
-    "id": "9fba35d5-d6a2-49b8-a5df-e3845b1c00c2",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "",
-    "path3": "",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": -1,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "a",
-    "itemPrimitiveType": "u",
-    "itemStringValueType": "u",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 285
-  },
-  {
-    "createTime": "2017-03-06 15:50:14",
-    "updateTime": "2017-03-06 15:50:14",
-    "sequence": "2017030615501471d85a5a-2110-4bca-b05f-128ea0d33487",
-    "id": "71d85a5a-2110-4bca-b05f-128ea0d33487",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "0",
-    "path3": "",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 0,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "o",
-    "itemPrimitiveType": "u",
-    "itemStringValueType": "u",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 810
-  },
-  {
-    "createTime": "2017-03-06 15:50:14",
-    "updateTime": "2017-03-06 15:50:14",
-    "sequence": "20170306155014b9cccf30-1520-43fd-8468-009aecbdf6ec",
-    "id": "b9cccf30-1520-43fd-8468-009aecbdf6ec",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "0",
-    "path3": "id",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 0,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "1",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 15
-  },
-  {
-    "createTime": "2017-03-06 15:50:14",
-    "updateTime": "2017-03-06 15:50:14",
-    "sequence": "20170306155014552c2c2a-42f0-48cc-a1ad-fdc431407a10",
-    "id": "552c2c2a-42f0-48cc-a1ad-fdc431407a10",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "0",
-    "path3": "name",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 0,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "陈军1",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 222
-  },
-  {
-    "createTime": "2017-03-06 15:50:14",
-    "updateTime": "2017-03-06 15:50:14",
-    "sequence": "201703061550141f4b8f4f-49b9-4e21-b111-52141d22615c",
-    "id": "1f4b8f4f-49b9-4e21-b111-52141d22615c",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "1",
-    "path3": "",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 1,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "o",
-    "itemPrimitiveType": "u",
-    "itemStringValueType": "u",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 777
-  },
-  {
-    "createTime": "2017-03-06 15:50:14",
-    "updateTime": "2017-03-06 15:50:14",
-    "sequence": "201703061550141a575054-2e64-4f29-a831-1980159656f4",
-    "id": "1a575054-2e64-4f29-a831-1980159656f4",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "1",
-    "path3": "id",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 1,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "2",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 611
-  },
-  {
-    "createTime": "2017-03-06 15:50:14",
-    "updateTime": "2017-03-06 15:50:14",
-    "sequence": "2017030615501411bf4a24-dc6e-4804-8471-00c1a6782612",
-    "id": "11bf4a24-dc6e-4804-8471-00c1a6782612",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "1",
-    "path3": "name",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 1,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "陈军2",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 60
-  },
-  {
-    "createTime": "2017-03-06 15:52:00",
-    "updateTime": "2017-03-06 15:52:00",
-    "sequence": "20170306155200dfb27694-1f9a-4181-938f-2c7bf0576919",
-    "id": "dfb27694-1f9a-4181-938f-2c7bf0576919",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "10",
-    "path3": "",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 10,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "o",
-    "itemPrimitiveType": "u",
-    "itemStringValueType": "u",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 253
-  },
-  {
-    "createTime": "2017-03-06 15:52:00",
-    "updateTime": "2017-03-06 15:52:00",
-    "sequence": "201703061552004e6dc849-87f4-4f19-bfc7-338c6975e535",
-    "id": "4e6dc849-87f4-4f19-bfc7-338c6975e535",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "10",
-    "path3": "id",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 10,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "11",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 768
-  },
-  {
-    "createTime": "2017-03-06 15:52:00",
-    "updateTime": "2017-03-06 15:52:00",
-    "sequence": "201703061552009f44f9ac-d30b-4556-ad43-cd2459e56006",
-    "id": "9f44f9ac-d30b-4556-ad43-cd2459e56006",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "10",
-    "path3": "name",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 10,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "陈军11",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 184
-  },
-  {
-    "createTime": "2017-03-06 15:50:14",
-    "updateTime": "2017-03-06 15:50:14",
-    "sequence": "201703061550144f60d7ec-f0e2-43cf-becc-38965dde533b",
-    "id": "4f60d7ec-f0e2-43cf-becc-38965dde533b",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "2",
-    "path3": "",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 2,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "o",
-    "itemPrimitiveType": "u",
-    "itemStringValueType": "u",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 803
-  },
-  {
-    "createTime": "2017-03-06 15:50:14",
-    "updateTime": "2017-03-06 15:50:14",
-    "sequence": "20170306155014ad98f7f0-669b-4e7e-b216-ba3d60bbaec9",
-    "id": "ad98f7f0-669b-4e7e-b216-ba3d60bbaec9",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "2",
-    "path3": "id",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 2,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "3",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 751
-  },
-  {
-    "createTime": "2017-03-06 15:50:14",
-    "updateTime": "2017-03-06 15:50:14",
-    "sequence": "2017030615501430dd7e7f-f58a-4954-96f0-8c9394227c7e",
-    "id": "30dd7e7f-f58a-4954-96f0-8c9394227c7e",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "2",
-    "path3": "name",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 2,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "陈军3",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 239
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "2017030615511911419563-ffb3-45a9-a2a8-8a9a9a00b8c5",
-    "id": "11419563-ffb3-45a9-a2a8-8a9a9a00b8c5",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "3",
-    "path3": "",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 3,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "o",
-    "itemPrimitiveType": "u",
-    "itemStringValueType": "u",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 504
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "20170306155119c21a88f9-7a2f-42e2-899d-b0f6e3841bff",
-    "id": "c21a88f9-7a2f-42e2-899d-b0f6e3841bff",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "3",
-    "path3": "id",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 3,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "4",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 156
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "201703061551198c4f1ff9-45f9-4d4b-88c8-0c6f5e45ba6b",
-    "id": "8c4f1ff9-45f9-4d4b-88c8-0c6f5e45ba6b",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "3",
-    "path3": "name",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 3,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "陈军4",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 397
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "2017030615511987959f7f-868a-4dea-9fe6-922c4ac1d4b7",
-    "id": "87959f7f-868a-4dea-9fe6-922c4ac1d4b7",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "4",
-    "path3": "",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 4,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "o",
-    "itemPrimitiveType": "u",
-    "itemStringValueType": "u",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 308
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "20170306155119eac1e623-a3d6-4637-8edc-c5acfcfae120",
-    "id": "eac1e623-a3d6-4637-8edc-c5acfcfae120",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "4",
-    "path3": "id",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 4,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "5",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 14
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "2017030615511949a6da2b-e25a-4ddb-b9c2-1d700b810540",
-    "id": "49a6da2b-e25a-4ddb-b9c2-1d700b810540",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "4",
-    "path3": "name",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 4,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "陈军5",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 668
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "20170306155119713ffb70-4cc7-4501-8b9c-6256c0af8d06",
-    "id": "713ffb70-4cc7-4501-8b9c-6256c0af8d06",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "5",
-    "path3": "",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 5,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "o",
-    "itemPrimitiveType": "u",
-    "itemStringValueType": "u",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 807
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "20170306155119d85d099c-e665-4ac1-88ce-a69757ab816a",
-    "id": "d85d099c-e665-4ac1-88ce-a69757ab816a",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "5",
-    "path3": "id",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 5,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "6",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 709
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "201703061551193e00b2fb-cbe1-47da-8530-537b5437e181",
-    "id": "3e00b2fb-cbe1-47da-8530-537b5437e181",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "5",
-    "path3": "name",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 5,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "陈军6",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 622
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "20170306155119c7bd7f8f-1557-4450-ab40-f5ca27fbe1a7",
-    "id": "c7bd7f8f-1557-4450-ab40-f5ca27fbe1a7",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "6",
-    "path3": "",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 6,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "o",
-    "itemPrimitiveType": "u",
-    "itemStringValueType": "u",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 427
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "2017030615511925306af2-c60d-4826-8160-e522e1992cd4",
-    "id": "25306af2-c60d-4826-8160-e522e1992cd4",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "6",
-    "path3": "id",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 6,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "7",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 361
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "20170306155119d2c48fe2-4b34-4a93-b93b-53141943b364",
-    "id": "d2c48fe2-4b34-4a93-b93b-53141943b364",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "6",
-    "path3": "name",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 6,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "陈军7",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 112
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "201703061551199cbbafd9-062e-4b74-96d8-b8190ffeefc5",
-    "id": "9cbbafd9-062e-4b74-96d8-b8190ffeefc5",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "7",
-    "path3": "",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 7,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "o",
-    "itemPrimitiveType": "u",
-    "itemStringValueType": "u",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 396
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "20170306155119b1349616-2d2a-4bbf-a6ce-e9474795eac4",
-    "id": "b1349616-2d2a-4bbf-a6ce-e9474795eac4",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "7",
-    "path3": "id",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 7,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "8",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 813
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "201703061551198168dd7c-e179-4cc1-bc62-a2d779db3fbc",
-    "id": "8168dd7c-e179-4cc1-bc62-a2d779db3fbc",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "7",
-    "path3": "name",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 7,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "陈军8",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 908
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "2017030615511934706f56-8f31-43a1-b8d0-946c93d0e08a",
-    "id": "34706f56-8f31-43a1-b8d0-946c93d0e08a",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "8",
-    "path3": "",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 8,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "o",
-    "itemPrimitiveType": "u",
-    "itemStringValueType": "u",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 825
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "20170306155119b5aa8f47-06d6-4b2e-ada4-8c29e6cede8b",
-    "id": "b5aa8f47-06d6-4b2e-ada4-8c29e6cede8b",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "8",
-    "path3": "id",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 8,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "9",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 189
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "20170306155119c9fab7ef-fa21-4ad7-9d3a-ae03074a8589",
-    "id": "c9fab7ef-fa21-4ad7-9d3a-ae03074a8589",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "8",
-    "path3": "name",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 8,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "陈军9",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 151
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "2017030615511973f968a5-ca2b-45fb-bec8-fb0e5c3edd34",
-    "id": "73f968a5-ca2b-45fb-bec8-fb0e5c3edd34",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "9",
-    "path3": "",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 9,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "o",
-    "itemPrimitiveType": "u",
-    "itemStringValueType": "u",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 883
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "20170306155119d2ec5a15-a591-4f4f-811c-64728af9d68e",
-    "id": "d2ec5a15-a591-4f4f-811c-64728af9d68e",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "9",
-    "path3": "id",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 9,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "10",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 556
-  },
-  {
-    "createTime": "2017-03-06 15:51:19",
-    "updateTime": "2017-03-06 15:51:19",
-    "sequence": "20170306155119f57a9a9c-f95a-40fe-9cc4-1bae3ca3786f",
-    "id": "f57a9a9c-f95a-40fe-9cc4-1bae3ca3786f",
-    "path0": "publishFor",
-    "path1": "personValue",
-    "path2": "9",
-    "path3": "name",
-    "path4": "",
-    "path5": "",
-    "path6": "",
-    "path7": "",
-    "path0Location": -1,
-    "path1Location": -1,
-    "path2Location": 9,
-    "path3Location": -1,
-    "path4Location": -1,
-    "path5Location": -1,
-    "path6Location": -1,
-    "path7Location": -1,
-    "itemType": "p",
-    "itemPrimitiveType": "s",
-    "itemStringValueType": "s",
-    "stringValue": "陈军10",
-    "job": "4a13d133-5ced-434e-a40a-fb764747e280",
-    "title": "测试流程1-无标题",
-    "startTime": "2017-03-06 15:46:27",
-    "startTimeMonth": "2017-03",
-    "creatorPerson": "周睿",
-    "creatorIdentity": "周睿(测试部门)",
-    "creatorDepartment": "测试部门",
-    "creatorCompany": "测试公司",
-    "application": "1fe7d4ac-e6ae-4801-b012-c04d6ca15567",
-    "applicationName": "测试",
-    "process": "f5028a66-c4eb-417d-a7ea-878cf680ef00",
-    "processName": "测试流程1",
-    "serial": "",
-    "completed": false,
-    "distributeFactor": 702
-  }
-]
+{
+	"stringFieldList": [
+		{
+			"name": "a",
+			"description": "a字段"
+		}
+	]
+}

+ 3 - 0
o2server/x_bbs_core_entity/src/main/java/com/x/bbs/entity/BBSSubjectAttachment.java

@@ -8,6 +8,8 @@ import javax.persistence.Id;
 import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
 import org.apache.commons.lang3.StringUtils;
@@ -59,6 +61,7 @@ public class BBSSubjectAttachment extends StorageObject {
 	}
 
 	@FieldDescribe("最后更新时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = "xlastUpdateTime")
 	@Index(name = TABLE + "_lastUpdateTime")
 	@CheckPersist(allowEmpty = false)

+ 9 - 0
o2server/x_bbs_core_entity/src/main/java/com/x/bbs/entity/BBSSubjectInfo.java

@@ -12,6 +12,8 @@ import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.OrderColumn;
 import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
 import org.apache.openjpa.persistence.PersistentCollection;
@@ -145,6 +147,7 @@ public class BBSSubjectInfo extends SliceJpaObject {
 
 	public static final String latestReplyTime_FIELDNAME = "latestReplyTime";
 	@FieldDescribe("最新回复时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = ColumnNamePrefix + latestReplyTime_FIELDNAME)
 	@CheckPersist(allowEmpty = true)
 	private Date latestReplyTime = null;
@@ -199,6 +202,7 @@ public class BBSSubjectInfo extends SliceJpaObject {
 
 	public static final String bBSIndexSetterTime_FIELDNAME = "bBSIndexSetterTime";
 	@FieldDescribe("首页推荐时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = ColumnNamePrefix + bBSIndexSetterTime_FIELDNAME)
 	@CheckPersist(allowEmpty = true)
 	private Date bBSIndexSetterTime = null;
@@ -217,6 +221,7 @@ public class BBSSubjectInfo extends SliceJpaObject {
 
 	public static final String forumIndexSetterTime_FIELDNAME = "forumIndexSetterTime";
 	@FieldDescribe("论坛推荐时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = ColumnNamePrefix + forumIndexSetterTime_FIELDNAME)
 	@CheckPersist(allowEmpty = true)
 	private Date forumIndexSetterTime = null;
@@ -277,6 +282,7 @@ public class BBSSubjectInfo extends SliceJpaObject {
 
 	public static final String screamSetterTime_FIELDNAME = "screamSetterTime";
 	@FieldDescribe("精华设置时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = ColumnNamePrefix + screamSetterTime_FIELDNAME)
 	@CheckPersist(allowEmpty = true)
 	private Date screamSetterTime = null;
@@ -295,6 +301,7 @@ public class BBSSubjectInfo extends SliceJpaObject {
 
 	public static final String originalSetterTime_FIELDNAME = "originalSetterTime";
 	@FieldDescribe("原创设置时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = ColumnNamePrefix + originalSetterTime_FIELDNAME)
 	@CheckPersist(allowEmpty = true)
 	private Date originalSetterTime = null;
@@ -313,6 +320,7 @@ public class BBSSubjectInfo extends SliceJpaObject {
 
 	public static final String recommendTime_FIELDNAME = "recommendTime";
 	@FieldDescribe("推荐时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = ColumnNamePrefix + recommendTime_FIELDNAME)
 	@CheckPersist(allowEmpty = true)
 	private Date recommendTime = null;
@@ -343,6 +351,7 @@ public class BBSSubjectInfo extends SliceJpaObject {
 
 	public static final String voteLimitTime_FIELDNAME = "voteLimitTime";
 	@FieldDescribe("投票截止时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = ColumnNamePrefix + voteLimitTime_FIELDNAME)
 	@CheckPersist(allowEmpty = true)
 	private Date voteLimitTime = null;

+ 4 - 0
o2server/x_bbs_core_entity/src/main/java/com/x/bbs/entity/BBSUserInfo.java

@@ -11,6 +11,8 @@ import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.Lob;
 import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
 import org.apache.openjpa.persistence.jdbc.Index;
@@ -176,12 +178,14 @@ public class BBSUserInfo extends SliceJpaObject {
 
 	public static final String lastVisitTime_FIELDNAME = "lastVisitTime";
 	@FieldDescribe("上次访问时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = ColumnNamePrefix + lastVisitTime_FIELDNAME)
 	@CheckPersist(allowEmpty = false)
 	private Date lastVisitTime = null;
 
 	public static final String lastOperationTime_FIELDNAME = "lastOperationTime";
 	@FieldDescribe("最近一次操作时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = ColumnNamePrefix + lastOperationTime_FIELDNAME)
 	@CheckPersist(allowEmpty = false)
 	private Date lastOperationTime = null;

+ 1 - 1
o2server/x_calendar_assemble_control/src/main/java/com/x/calendar/assemble/control/jaxrs/calendar/ActionListWithCondition.java

@@ -33,7 +33,7 @@ public class ActionListWithCondition extends BaseAction {
 		List<Wo> wraps = null;
 		List<Calendar> calendarList = null;
 		Boolean check = true;
-		Boolean manager = false;
+		//Boolean manager = false;
 		List<String> unitNames = null;
 		List<String> groupNames = null;
 		String personName = effectivePerson.getDistinguishedName();

+ 5 - 0
o2server/x_calendar_core_entity/src/main/java/com/x/calendar/core/entity/Calendar_Event.java

@@ -14,6 +14,8 @@ import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.OrderColumn;
 import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
 import org.apache.openjpa.persistence.PersistentCollection;
@@ -197,6 +199,7 @@ public class Calendar_Event extends SliceJpaObject implements Cloneable, Compara
 
 	public static final String startTime_FIELDNAME = "startTime";
 	@FieldDescribe("事件开始时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = ColumnNamePrefix + startTime_FIELDNAME)
 	@Index(name = TABLE + IndexNameMiddle + startTime_FIELDNAME)
 	@CheckPersist(allowEmpty = false)
@@ -211,6 +214,7 @@ public class Calendar_Event extends SliceJpaObject implements Cloneable, Compara
 
 	public static final String endTime_FIELDNAME = "endTime";
 	@FieldDescribe("事件结束时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = ColumnNamePrefix + endTime_FIELDNAME)
 	@Index(name = TABLE + IndexNameMiddle + endTime_FIELDNAME)
 	@CheckPersist(allowEmpty = false)
@@ -261,6 +265,7 @@ public class Calendar_Event extends SliceJpaObject implements Cloneable, Compara
 
 	public static final String alarmTime_FIELDNAME = "alarmTime";
 	@FieldDescribe("当前事件提醒时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = ColumnNamePrefix + alarmTime_FIELDNAME)
 	@CheckPersist(allowEmpty = true)
 	private Date alarmTime = null;

+ 6 - 0
o2server/x_calendar_core_entity/src/main/java/com/x/calendar/core/entity/Calendar_EventRepeatMaster.java

@@ -14,6 +14,8 @@ import javax.persistence.Inheritance;
 import javax.persistence.InheritanceType;
 import javax.persistence.OrderColumn;
 import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
 import javax.persistence.UniqueConstraint;
 
 import org.apache.commons.lang3.StringUtils;
@@ -201,6 +203,7 @@ public class Calendar_EventRepeatMaster extends SliceJpaObject implements Clonea
 
 	public static final String startTime_FIELDNAME = "startTime";
 	@FieldDescribe("事件开始时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = ColumnNamePrefix + startTime_FIELDNAME)
 	@Index(name = TABLE + IndexNameMiddle + startTime_FIELDNAME)
 	@CheckPersist(allowEmpty = false)
@@ -208,6 +211,7 @@ public class Calendar_EventRepeatMaster extends SliceJpaObject implements Clonea
 
 	public static final String endTime_FIELDNAME = "endTime";
 	@FieldDescribe("事件结束时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = ColumnNamePrefix + endTime_FIELDNAME)
 	@Index(name = TABLE + IndexNameMiddle + endTime_FIELDNAME)
 	@CheckPersist(allowEmpty = false)
@@ -233,6 +237,7 @@ public class Calendar_EventRepeatMaster extends SliceJpaObject implements Clonea
 
 	public static final String recurrenceStartTime_FIELDNAME = "recurrenceStartTime";
 	@FieldDescribe("重复开始时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = ColumnNamePrefix + recurrenceStartTime_FIELDNAME)
 	@CheckPersist(allowEmpty = false)
 	private Date recurrenceStartTime = null;
@@ -257,6 +262,7 @@ public class Calendar_EventRepeatMaster extends SliceJpaObject implements Clonea
 
 	public static final String alarmTime_FIELDNAME = "alarmTime";
 	@FieldDescribe("当前事件提醒时间")
+	@Temporal(TemporalType.TIMESTAMP)
 	@Column(name = ColumnNamePrefix + alarmTime_FIELDNAME)
 	@CheckPersist(allowEmpty = true)
 	private Date alarmTime = null;

+ 0 - 40
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/Business.java

@@ -24,10 +24,6 @@ import com.x.cms.assemble.control.factory.FormFactory;
 import com.x.cms.assemble.control.factory.FormFieldFactory;
 import com.x.cms.assemble.control.factory.ItemFactory;
 import com.x.cms.assemble.control.factory.LogFactory;
-import com.x.cms.assemble.control.factory.RescissoryClass_AppCategoryAdminFactory;
-import com.x.cms.assemble.control.factory.RescissoryClass_AppCategoryPermissionFactory;
-import com.x.cms.assemble.control.factory.RescissoryClass_DocumentPermissionFactory;
-import com.x.cms.assemble.control.factory.ReviewFactory;
 import com.x.cms.assemble.control.factory.ScriptFactory;
 import com.x.cms.assemble.control.factory.SearchFactory;
 import com.x.cms.assemble.control.factory.TemplateFormFactory;
@@ -72,7 +68,6 @@ public class Business {
 	private Organization organization;
 	private ItemFactory itemFactory;
 	private FormFieldFactory formFieldFactory;
-	private ReviewFactory reviewFactory;
 
 	public FileFactory fileFactory() throws Exception {
 		if (null == this.fileFactory) {
@@ -81,13 +76,6 @@ public class Business {
 		return fileFactory;
 	}
 	
-	public ReviewFactory reviewFactory() throws Exception {
-		if (null == this.reviewFactory) {
-			this.reviewFactory = new ReviewFactory(this);
-		}
-		return reviewFactory;
-	}
-	
 	public FormFieldFactory formFieldFactory() throws Exception {
 		if (null == this.formFieldFactory) {
 			this.formFieldFactory = new FormFieldFactory(this);
@@ -519,32 +507,4 @@ public class Business {
 		}
 		return result;
 	}
-	
-	//********************************************************************************************************
-	//*******************               废除的属性和方法 ,使用新的数据结构来控制权限            ***************
-	//********************************************************************************************************
-	private RescissoryClass_AppCategoryPermissionFactory appCategoryPermissionFactory;
-	private RescissoryClass_AppCategoryAdminFactory appCategoryAdminFactory;
-	private RescissoryClass_DocumentPermissionFactory documentPermissionFactory;
-	
-	public RescissoryClass_DocumentPermissionFactory documentPermissionFactory() throws Exception {
-		if (null == this.documentPermissionFactory) {
-			this.documentPermissionFactory = new RescissoryClass_DocumentPermissionFactory(this);
-		}
-		return documentPermissionFactory;
-	}
-	
-	public RescissoryClass_AppCategoryPermissionFactory getAppCategoryPermissionFactory() throws Exception {
-		if (null == this.appCategoryPermissionFactory) {
-			this.appCategoryPermissionFactory = new RescissoryClass_AppCategoryPermissionFactory(this);
-		}
-		return appCategoryPermissionFactory;
-	}
-
-	public RescissoryClass_AppCategoryAdminFactory getAppCategoryAdminFactory() throws Exception {
-		if (null == this.appCategoryAdminFactory) {
-			this.appCategoryAdminFactory = new RescissoryClass_AppCategoryAdminFactory(this);
-		}
-		return appCategoryAdminFactory;
-	}
 }

+ 0 - 3
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/ThisApplication.java

@@ -7,7 +7,6 @@ import com.x.cms.assemble.control.queue.DataImportStatus;
 import com.x.cms.assemble.control.queue.QueueDataRowImport;
 import com.x.cms.assemble.control.queue.QueueDocumentDelete;
 import com.x.cms.assemble.control.queue.QueueDocumentUpdate;
-import com.x.cms.assemble.control.timertask.Timertask_DocumentReviewTask;
 import com.x.cms.assemble.control.timertask.Timertask_LogRecordCheckTask;
 
 public class ThisApplication {
@@ -33,8 +32,6 @@ public class ThisApplication {
 		context().startQueue( queueDocumentUpdate );
 		// 每天凌晨2点执行一次
 		context.schedule( Timertask_LogRecordCheckTask.class, "0 0 2 * * ?" );
-		//每2分钟执行一次
-		context.schedule(Timertask_DocumentReviewTask.class, "0 */2 * * * ?");
 	}
 
 	public static void destroy() {

+ 0 - 10
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/AppInfoFactory.java

@@ -150,16 +150,6 @@ public class AppInfoFactory extends AbstractFactory {
 		p = cb.or(p, root.get(AppInfo_.appName).in(appAliases));
 		return em.createQuery(cq.where(p)).getResultList();
 	}
-	
-	public List<AppInfo> listInReviewAppInfoList() throws Exception {
-		EntityManager em = this.entityManagerContainer().get(AppInfo.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<AppInfo> cq = cb.createQuery(AppInfo.class);
-		Root<AppInfo> root = cq.from(AppInfo.class);
-		Predicate p = cb.equal( root.get(AppInfo_.documentType), "信息");
-		p = cb.and(p, cb.or(cb.isFalse( root.get(AppInfo_.reviewed ) ), cb.isNull(root.get(AppInfo_.reviewed ))));
-		return em.createQuery(cq.where(p)).getResultList();
-	}
 
 	public <T extends AppInfo> List<T> sort(List<T> list) {
 		list = list.stream()

+ 1 - 11
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/CategoryInfoFactory.java

@@ -73,17 +73,7 @@ public class CategoryInfoFactory extends AbstractFactory {
 		cq.select(root.get( CategoryInfo_.id));
 		return em.createQuery( cq.where(p) ).setMaxResults(1000).getResultList();
 	}
-	
-	public List<CategoryInfo> listInReviewCategoryInfoList() throws Exception {
-		EntityManager em = this.entityManagerContainer().get(CategoryInfo.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<CategoryInfo> cq = cb.createQuery(CategoryInfo.class);
-		Root<CategoryInfo> root = cq.from(CategoryInfo.class);
-		Predicate p = cb.equal( root.get(CategoryInfo_.documentType), "信息");
-		p = cb.and(p, cb.or(cb.isFalse( root.get(CategoryInfo_.reviewed ) ), cb.isNull(root.get(CategoryInfo_.reviewed ))));
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
+
 	public List<String> listByAppIds( List<String> appIds, String documentType, Boolean manager, Integer maxCount ) throws Exception {
 		EntityManager em = this.entityManagerContainer().get( CategoryInfo.class );
 		CriteriaBuilder cb = em.getCriteriaBuilder();

+ 0 - 23
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/DocumentFactory.java

@@ -50,16 +50,6 @@ public class DocumentFactory<T> extends AbstractFactory {
 		return em.createQuery(cq).getResultList();
 	}
 	
-	//@MethodDescribe("列示指定Id的Document信息列表")
-//	public List<Document> list(List<String> ids) throws Exception {
-//		EntityManager em = this.entityManagerContainer().get( Document.class );
-//		CriteriaBuilder cb = em.getCriteriaBuilder();
-//		CriteriaQuery<Document> cq = cb.createQuery( Document.class );
-//		Root<Document> root = cq.from( Document.class );
-//		Predicate p = root.get( Document_.id).in( ids );
-//		return em.createQuery(cq.where(p)).getResultList();
-//	}
-	
 	//@MethodDescribe("根据应用ID列示所有的Document信息列表")
 	public List<String> listByAppId( String appId, String documentType, Integer maxCount ) throws Exception {
 		EntityManager em = this.entityManagerContainer().get( Document.class );
@@ -96,19 +86,6 @@ public class DocumentFactory<T> extends AbstractFactory {
 		return em.createQuery(cq).getSingleResult();
 	}
 	
-//	public Long countWithDocIds(List<String> viewAbleDocIds) throws Exception {
-//		if( viewAbleDocIds == null || viewAbleDocIds.isEmpty() ){
-//			return 0L;
-//		}
-//		EntityManager em = this.entityManagerContainer().get( Document.class );
-//		CriteriaBuilder cb = em.getCriteriaBuilder();
-//		CriteriaQuery<Long> cq = cb.createQuery( Long.class );
-//		Root<Document> root = cq.from( Document.class );
-//		Predicate p = root.get( Document_.id ).in( viewAbleDocIds );
-//		cq.select( cb.count( root ) );
-//		return em.createQuery(cq.where(p)).getSingleResult();
-//	}
-	
 	public List<Document> listInReviewDocumentList( Integer maxCount ) throws Exception {
 		EntityManager em = this.entityManagerContainer().get(Document.class);
 		CriteriaBuilder cb = em.getCriteriaBuilder();

+ 0 - 261
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/RescissoryClass_AppCategoryAdminFactory.java

@@ -1,261 +0,0 @@
-package com.x.cms.assemble.control.factory;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import com.x.base.core.project.exception.ExceptionWhen;
-import com.x.cms.assemble.control.AbstractFactory;
-import com.x.cms.assemble.control.Business;
-import com.x.cms.core.entity.AppCategoryAdmin;
-import com.x.cms.core.entity.AppCategoryAdmin_;
-
-/**
- * 应用分类管理员配置管理表基础功能服务类
- * 
- * @author O2LEE
- */
-public class RescissoryClass_AppCategoryAdminFactory extends AbstractFactory {
-
-	public RescissoryClass_AppCategoryAdminFactory( Business business ) throws Exception {
-		super(business);
-	}
-
-	/**
-	 * @param id
-	 * @return AppCategoryAdmin
-	 * @throws Exception
-	 */
-	//@MethodDescribe("获取指定Id的AppCategoryAdmin应用分类管理员配置信息对象")
-	public AppCategoryAdmin get( String id ) throws Exception {
-		return this.entityManagerContainer().find( id, AppCategoryAdmin.class, ExceptionWhen.none );
-	}
-	
-	/**
-	 * @return List:String
-	 * @throws Exception
-	 */
-	@SuppressWarnings("unused")
-	//@MethodDescribe("列示全部的AppCategoryAdmin应用分类管理员配置信息ID列表")
-	public List<AppCategoryAdmin> listAll() throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryAdmin.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<AppCategoryAdmin> cq = cb.createQuery(AppCategoryAdmin.class);
-		Root<AppCategoryAdmin> root = cq.from(AppCategoryAdmin.class);
-		return em.createQuery(cq).getResultList();
-	}
-	
-	/**
-	 * 
-	 * @param ids 需要查询的ID列表
-	 * @return List:AppCategoryAdmin
-	 * @throws Exception
-	 */
-	//@MethodDescribe("列示指定Id的AppCategoryAdmin应用分类管理员配置信息列表")
-	public List<AppCategoryAdmin> list( List<String> ids ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryAdmin.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<AppCategoryAdmin> cq = cb.createQuery( AppCategoryAdmin.class );
-		Root<AppCategoryAdmin> root = cq.from( AppCategoryAdmin.class );
-		Predicate p = root.get( AppCategoryAdmin_.id ).in(ids);
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	
-	
-	/**
-	 * 列示指定目录相关的所有管理员配置信息ID列表
-	 * @param person 用户UID
-	 * @return List:String (AppCategoryAdmin_.id)
-	 * @throws Exception
-	 */
-	//@MethodDescribe("列示指定目录相关的所有管理员配置信息ID列表")
-	public List<String> listAppCategoryIdByCategoryId( String categoryId ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryAdmin.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		
-		Root<AppCategoryAdmin> root = cq.from( AppCategoryAdmin.class );
-		Predicate p = cb.equal(root.get( AppCategoryAdmin_.objectId ), categoryId );
-		p = cb.and( p, cb.equal(root.get( AppCategoryAdmin_.objectType ), "CATEGORY" ) );
-		
-		cq.select( root.get( AppCategoryAdmin_.id ) );
-		return em.createQuery( cq.where(p) ).getResultList();
-	}
-	
-	/**
-	 * 列示指定应用栏目相关的所有管理员配置信息ID列表
-	 * @param person 用户UID
-	 * @return List:String (AppCategoryAdmin_.id)
-	 * @throws Exception
-	 */
-	//@MethodDescribe("列示指定应用栏目相关的所有管理员配置信息ID列表")
-	public List<String> listAppCategoryIdByAppId( String appId ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryAdmin.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);		
-		Root<AppCategoryAdmin> root = cq.from( AppCategoryAdmin.class );
-		Predicate p = cb.equal(root.get( AppCategoryAdmin_.objectId ), appId );
-		p = cb.and( p, cb.equal(root.get( AppCategoryAdmin_.objectType ), "APPINFO" ) );		
-		cq.select( root.get( AppCategoryAdmin_.id ) );
-		return em.createQuery( cq.where(p) ).getResultList();
-	}
-	
-	/**
-	 * 列示指定应用栏目相关的所有管理员配置信息ID列表
-	 * @param person 用户UID
-	 * @return List:String (AppCategoryAdmin_.id)
-	 * @throws Exception
-	 */
-	//@MethodDescribe("列示指定应用栏目相关的所有管理员配置信息ID列表")
-	public List<String> listAppCategoryIdByAppId( String appId, String personName ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryAdmin.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);		
-		Root<AppCategoryAdmin> root = cq.from( AppCategoryAdmin.class );
-		Predicate p = cb.equal(root.get( AppCategoryAdmin_.objectId ), appId );
-		p = cb.and( p, cb.equal(root.get( AppCategoryAdmin_.objectType ), "APPINFO" ) );
-		p = cb.and( p, cb.equal(root.get( AppCategoryAdmin_.adminName ), personName ) );	
-		cq.select( root.get( AppCategoryAdmin_.id ) );
-		return em.createQuery( cq.where(p) ).getResultList();
-	}
-	
-	/**
-	 * 列示指定应用栏目相关的所有管理员配置信息ID列表
-	 * @param person 用户UID
-	 * @return List:String (AppCategoryAdmin_.id)
-	 * @throws Exception
-	 */
-	//@MethodDescribe("列示指定应用栏目相关的所有管理员配置信息ID列表")
-	public List<String> listAppCategoryIdByUser( String uid ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryAdmin.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);		
-		Root<AppCategoryAdmin> root = cq.from( AppCategoryAdmin.class );
-		Predicate p = cb.equal(root.get( AppCategoryAdmin_.adminUid ), uid );		
-		cq.select( root.get( AppCategoryAdmin_.id ) );
-		return em.createQuery( cq.where(p) ).getResultList();
-	}
-	
-	/**
-	 * 列示指定用户可以管理的全部的对象信息ID列表
-	 * @param person 用户UID
-	 * @param objectType 对象类别 ( ALL | APP | CATEGORY )
-	 * @return List:String (AppCategoryAdmin_.objectId)
-	 * @throws Exception
-	 */
-	//@MethodDescribe("列示指定用户可以管理的全部的对象信息ID列表")
-	public List<String> listAppCategoryIdByAdminName( String person, String objectType ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryAdmin.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		
-		Root<AppCategoryAdmin> root = cq.from( AppCategoryAdmin.class );
-		Predicate p = null;
-		
-		//如果需要查询指定用户的权限
-		if( person != null && !person.isEmpty() ){
-			p = cb.equal(root.get( AppCategoryAdmin_.adminUid ), person );
-		}
-		//如果需要查询指定类别的权限	
-		if( p != null ){//说明前面有用户的查询条件
-			if( !"ALL".equalsIgnoreCase( objectType )){
-				//查询指定用户所有的指定类别的配置信息
-				p = cb.and(p, cb.equal(root.get( AppCategoryAdmin_.objectType ), objectType ) );
-			}
-		}else{
-			//没有用户查询条件
-			if( !"ALL".equalsIgnoreCase( objectType )){
-				//查询指定用户所有的指定类别的配置信息
-				p = cb.equal(root.get( AppCategoryAdmin_.objectType ), objectType );
-			}
-		}
-		cq.select( root.get( AppCategoryAdmin_.id ) );
-		
-		if( p != null ){
-			return em.createQuery( cq.where( p ) ).getResultList();
-		}else{
-			return em.createQuery( cq ).getResultList();
-		}
-	}
-	
-	/**
-	 * 判断用户是否是指定的应用或者分类的管理员
-	 * @param person 用户UID
-	 * @param objectType 对象类别 ( ALL | APP | CATEGORY )
-	 * @param objectId
-	 * @return List:String (AppCategoryAdmin_.objectId)
-	 * @throws Exception
-	 */
-	//@MethodDescribe("列示指定用户可以管理的全部的对象信息ID列表")
-	public boolean isAdmin( String person, String objectType, String objectId ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryAdmin.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		
-		Root<AppCategoryAdmin> root = cq.from( AppCategoryAdmin.class );
-		Predicate p = cb.equal(root.get( AppCategoryAdmin_.adminUid ), person );
-		
-		if( objectType == null || person == null || objectId == null ){
-			return false;
-		}else{
-			//查询指定用户所有的指定类别的配置信息
-			p = cb.and( p, 
-					cb.equal(root.get( AppCategoryAdmin_.objectType ), objectType ),
-					cb.equal(root.get( AppCategoryAdmin_.objectId ), objectId ),
-					cb.equal(root.get( AppCategoryAdmin_.adminLevel ), "ADMIN" )
-			);			
-		}
-		cq.select( root.get( AppCategoryAdmin_.id ) );
-		List<String> ids = em.createQuery( cq.where(p) ).getResultList();
-	
-		if( ids == null || ids.size() == 0 ){
-			return false;
-		}else{
-			return true;
-		}
-	}
-	
-	/**
-	 * 根据人员姓名获取用户可以管理的分类目ID列表
-	 * @param personName
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listCategoryInfoIdsByAdminName( String personName ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get(AppCategoryAdmin.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<AppCategoryAdmin> root = cq.from(AppCategoryAdmin.class);
-		Predicate p = cb.isNotNull(  root.get(AppCategoryAdmin_.objectId ) );
-		p = cb.and( p, cb.equal( root.get(AppCategoryAdmin_.adminName ), personName ) );
-		p = cb.and( p, cb.equal( root.get(AppCategoryAdmin_.objectType ), "CATEGORY" ) );
-		cq.select(root.get(AppCategoryAdmin_.objectId ));
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public List<String> listAppCategoryIdByCondition( String objectType, String objectId, String personName ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryAdmin.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<AppCategoryAdmin> root = cq.from(AppCategoryAdmin.class);
-		Predicate p = cb.isNotNull(  root.get(AppCategoryAdmin_.objectId ) );
-		
-		if( objectType != null && !objectType.isEmpty() ){
-			p = cb.and( p, cb.equal( root.get(AppCategoryAdmin_.objectType ), objectType ) );
-		}
-		if( personName != null && !personName.isEmpty() ){
-			p = cb.and( p, cb.equal( root.get(AppCategoryAdmin_.adminName ), personName ) );
-		}
-		if( objectId != null && !objectId.isEmpty() ){
-			p = cb.and( p, cb.equal( root.get(AppCategoryAdmin_.objectId ), objectId ) );
-		}
-		cq.select(root.get(AppCategoryAdmin_.objectId ));
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-}

+ 0 - 336
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/RescissoryClass_AppCategoryPermissionFactory.java

@@ -1,336 +0,0 @@
-package com.x.cms.assemble.control.factory;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import com.x.base.core.project.exception.ExceptionWhen;
-import com.x.cms.assemble.control.AbstractFactory;
-import com.x.cms.assemble.control.Business;
-import com.x.cms.core.entity.AppCategoryPermission;
-import com.x.cms.core.entity.AppCategoryPermission_;
-
-/**
- * 应用分类权限管理表基础功能服务类
- * 
- * @author O2LEE
- */
-public class RescissoryClass_AppCategoryPermissionFactory extends AbstractFactory {
-
-	public RescissoryClass_AppCategoryPermissionFactory( Business business ) throws Exception {
-		super(business);
-	}
-
-	//@MethodDescribe("获取指定Id的AppCategoryPermission应用分类权限配置信息对象")
-	public AppCategoryPermission get( String id ) throws Exception {
-		return this.entityManagerContainer().find( id, AppCategoryPermission.class, ExceptionWhen.none );
-	}
-	
-	@SuppressWarnings("unused")
-	//@MethodDescribe("列示全部的AppCategoryPermission应用分类权限配置信息列表")
-	public List<AppCategoryPermission> listAll() throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<AppCategoryPermission> cq = cb.createQuery(AppCategoryPermission.class);
-		Root<AppCategoryPermission> root = cq.from(AppCategoryPermission.class);
-		return em.createQuery(cq).getResultList();
-	}
-	
-	//@MethodDescribe("列示指定Id的AppCategoryPermission应用分类权限配置信息列表")
-	public List<AppCategoryPermission> list(List<String> ids) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<AppCategoryPermission> cq = cb.createQuery( AppCategoryPermission.class );
-		Root<AppCategoryPermission> root = cq.from( AppCategoryPermission.class );
-		Predicate p = root.get(AppCategoryPermission_.id).in(ids);
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 列示指定应用栏目的所有权限配置信息
-	 * @param appId
-	 * @param permission
-	 * @return
-	 * @throws Exception
-	 */
-	//@MethodDescribe("列示指定应用栏目的所有权限配置信息")
-	public List<String> listPermissionByAppInfo( String appId, String permission ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		
-		Root<AppCategoryPermission> root = cq.from( AppCategoryPermission.class );
-		Predicate p = cb.equal(root.get( AppCategoryPermission_.objectType ), "APPINFO");
-		p = cb.and(p, cb.equal(root.get( AppCategoryPermission_.objectId ),appId) );
-		if( permission != null && !permission.isEmpty() ){
-			p = cb.and(p, cb.equal( root.get( AppCategoryPermission_.permission ),permission ) );
-		}
-		cq.select( root.get( AppCategoryPermission_.id ) );
-		return em.createQuery( cq.where(p) ).getResultList();
-	}
-	
-	/**
-	 * 列示指定分类的所有权限配置信息
-	 * @param categoryId
-	 * @param permission
-	 * @return
-	 * @throws Exception
-	 */
-	//@MethodDescribe("列示指定分类的所有权限配置信息")
-	public List<String> listPermissionByCataogry( String categoryId, String permission ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<AppCategoryPermission> root = cq.from( AppCategoryPermission.class );
-		Predicate p = cb.equal(root.get( AppCategoryPermission_.objectType ), "CATEGORY");
-		p = cb.and(p, cb.equal(root.get( AppCategoryPermission_.objectId ),categoryId) );
-		if( permission != null && !permission.isEmpty() ){
-			p = cb.and(p, cb.equal( root.get( AppCategoryPermission_.permission ),permission ) );
-		}
-		cq.select( root.get( AppCategoryPermission_.id ) );
-		return em.createQuery( cq.where(p) ).getResultList();
-	}
-
-	/**
-	 * 根据对象类别以及权限类别查询涉及权限的所有栏目ID列表
-	 * 
-	 * @param type
-	 * @param permission
-	 * @return
-	 * @throws Exception
-	 */
-	//@MethodDescribe("根据对象类别以及权限类别查询涉及权限的所有栏目ID列表")
-	public List<String> listAllAppInfoIds( String type, String permission ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery( String.class );
-		Root<AppCategoryPermission> root = cq.from( AppCategoryPermission.class );
-		Predicate p = cb.isNotNull( root.get( AppCategoryPermission_.id ) );
-		if( type != null && !type.isEmpty() ){
-			p = cb.and(p, cb.equal( root.get( AppCategoryPermission_.objectType ), type ) );
-		}
-		if( permission != null && !permission.isEmpty() ){
-			p = cb.and(p, cb.equal( root.get( AppCategoryPermission_.permission ), permission ) );
-		}
-		cq.distinct(true).select( root.get( AppCategoryPermission_.appId ) );
-		
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 根据权限类别查询涉及权限的所有分类ID列表
-	 * 
-	 * @param permission
-	 * @return
-	 * @throws Exception
-	 */
-	//@MethodDescribe("根据权限类别查询涉及权限的所有分类ID列表")
-	public List<String> listAllCategoryInfoIds( String permission ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<AppCategoryPermission> root = cq.from(AppCategoryPermission.class);
-		Predicate p = cb.equal(root.get( AppCategoryPermission_.objectType ), "CATEGORY");
-		if( permission != null && !permission.isEmpty() ){
-			p = cb.and(p, cb.equal( root.get( AppCategoryPermission_.permission ),permission ) );
-		}
-		cq.distinct(true).select( root.get( AppCategoryPermission_.objectId ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 根据权限类别查询涉及权限的所有分类ID列表
-	 * 
-	 * @param permission
-	 * @return
-	 * @throws Exception
-	 */
-	//@MethodDescribe("根据权限类别查询涉及权限的所有分类ID列表")
-	public List<String> listAllCategoryInfoIds( String appId, String permission ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<AppCategoryPermission> root = cq.from(AppCategoryPermission.class);
-		Predicate p = cb.equal(root.get( AppCategoryPermission_.objectType ), "CATEGORY");
-		if( appId != null && !appId.isEmpty() ){
-			p = cb.and(p, cb.equal( root.get( AppCategoryPermission_.appId ),appId ) );
-		}
-		if( permission != null && !permission.isEmpty() ){
-			p = cb.and(p, cb.equal( root.get( AppCategoryPermission_.permission ),permission ) );
-		}
-		cq.distinct(true).select( root.get( AppCategoryPermission_.objectId ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	/**
-	 * 根据用户姓名以及用户所在的顶层组织和组织列表以及权限类别查询该用户可以访问到的所有应用栏目ID列表
-	 * @param name
-	 * @param unitNames
-	 * @param topUnitNames
-	 * @param groupNames 
-	 * @param permission
-	 * @return
-	 * @throws Exception
-	 */
-	//@MethodDescribe("根据用户姓名以及用户所在的顶层组织和组织列表以及权限类别查询该用户可以访问到的所有应用栏目ID列表")
-	public List<String> listAppInfoIdsByPermission( String name, List<String> unitNames, List<String> groupNames, String appId, String permission ) throws Exception {
-		if( ( name == null || name.isEmpty() )
-			&& ( unitNames == null || unitNames.isEmpty() ) 
-		){
-			throw new Exception( "name and unitNames can not be all null, query needs one condition." );
-		}
-		EntityManager em = this.entityManagerContainer().get( AppCategoryPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<AppCategoryPermission> root = cq.from(AppCategoryPermission.class);
-		Predicate p = cb.equal(root.get( AppCategoryPermission_.objectType ), "APPINFO");
-		Predicate p_or  = null;
-		Predicate p_or_user  = null;
-		Predicate p_or_dept  = null;
-		Predicate p_or_grop  = null;
-		if( appId != null && !appId.isEmpty() ){
-			p = cb.and( p, cb.equal( root.get( AppCategoryPermission_.appId ), appId) );
-		}
-		if( permission != null && !permission.isEmpty() ){
-			p = cb.and( p, cb.equal( root.get( AppCategoryPermission_.permission ), permission) );
-		}
-		if( name != null && !name.isEmpty() ){
-			p_or_user = cb.equal(root.get( AppCategoryPermission_.usedObjectType ), "USER");
-			p_or_user = cb.and( p_or_user, cb.equal(root.get( AppCategoryPermission_.usedObjectName ), name ) );
-			p_or = p_or_user;
-		}
-		if( unitNames != null && !unitNames.isEmpty() ){
-			p_or_dept = cb.equal(root.get( AppCategoryPermission_.usedObjectType ), "UNIT");
-			p_or_dept = cb.and( p_or_dept, root.get( AppCategoryPermission_.usedObjectName ).in( unitNames ) );
-			if( p_or == null ){
-				p_or = p_or_dept;
-			}else{
-				p_or = cb.or( p_or, p_or_dept );
-			}
-		}
-		if( groupNames != null && !groupNames.isEmpty() ){
-			p_or_grop = cb.equal(root.get( AppCategoryPermission_.usedObjectType ), "GROUP");
-			p_or_grop = cb.and( p_or_grop, root.get( AppCategoryPermission_.usedObjectName ).in( groupNames ) );
-			if( p_or == null ){
-				p_or = p_or_grop;
-			}else{
-				p_or = cb.or( p_or, p_or_grop );
-			}
-		}
-		
-		p = cb.and( p, p_or );
-		cq.distinct(true).select( root.get( AppCategoryPermission_.objectId ) );
-		
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 根据用户姓名以及用户所在的顶层组织和组织列表以及权限类别查询该用户可以访问到的所有分类ID列表
-	 * @param name
-	 * @param unitNames
-	 * @param topUnitNames
-	 * @param groupNames 
-	 * @param appId
-	 * @param permission
-	 * @return
-	 * @throws Exception
-	 */
-	//@MethodDescribe("根据用户姓名以及用户所在的顶层组织和组织列表以及权限类别查询该用户可以访问到的所有分类ID列表")
-	public List<String> listCategoryIdsByPermission( String name, List<String> unitNames, List<String> groupNames, String appId, String permission ) throws Exception {
-		if( ( name == null || name.isEmpty() )
-			&& ( unitNames == null || unitNames.isEmpty() ) 
-		){
-			throw new Exception( "name, unitNames can not be all null, query needs one condition." );
-		}
-		EntityManager em = this.entityManagerContainer().get( AppCategoryPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<AppCategoryPermission> root = cq.from(AppCategoryPermission.class);
-		Predicate p = cb.equal(root.get( AppCategoryPermission_.objectType ), "CATEGORY");
-		Predicate p_or  = null;
-		Predicate p_or_user  = null;
-		Predicate p_or_dept  = null;
-		Predicate p_or_grop  = null;
-		if( appId != null && !appId.isEmpty() ){
-			p = cb.and( p, cb.equal( root.get( AppCategoryPermission_.appId ), appId) );
-		}
-		if( permission != null && !permission.isEmpty() ){
-			p = cb.and( p, cb.equal( root.get( AppCategoryPermission_.permission ), permission) );
-		}
-		if( name != null && !name.isEmpty() ){
-			p_or_user = cb.equal(root.get( AppCategoryPermission_.usedObjectType ), "USER");
-			p_or_user = cb.and( p_or_user, cb.equal(root.get( AppCategoryPermission_.usedObjectName ), name ) );
-			p_or = p_or_user;
-		}
-		if( unitNames != null && !unitNames.isEmpty() ){
-			p_or_dept = cb.equal(root.get( AppCategoryPermission_.usedObjectType ), "UNIT");
-			p_or_dept = cb.and( p_or_dept, root.get( AppCategoryPermission_.usedObjectName ).in( unitNames ) );
-			if( p_or == null ){
-				p_or = p_or_dept;
-			}else{
-				p_or = cb.or( p_or, p_or_dept );
-			}
-		}
-		if( groupNames != null && !groupNames.isEmpty() ){
-			p_or_grop = cb.equal(root.get( AppCategoryPermission_.usedObjectType ), "GROUP");
-			p_or_grop = cb.and( p_or_grop, root.get( AppCategoryPermission_.usedObjectName ).in( groupNames ) );
-			if( p_or == null ){
-				p_or = p_or_grop;
-			}else{
-				p_or = cb.or( p_or, p_or_grop );
-			}
-		}
-		
-		p = cb.and( p, p_or );
-		cq.distinct(true).select( root.get( AppCategoryPermission_.objectId ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public List<String> listAppCategoryIdByCondition(String objectType, String objectId, String personName, String permission) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( AppCategoryPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery( String.class );
-		Root<AppCategoryPermission> root = cq.from( AppCategoryPermission.class );
-		Predicate p = cb.isNotNull( root.get( AppCategoryPermission_.id ) );
-		if( objectType != null && !objectType.isEmpty() ){
-			p = cb.and(p, cb.equal( root.get( AppCategoryPermission_.objectType ),objectType ) );
-		}
-		if( objectId != null && !objectId.isEmpty() ){
-			p = cb.and(p, cb.equal( root.get( AppCategoryPermission_.objectId ),objectId ) );
-		}
-		if( personName != null && !personName.isEmpty() ){
-			p = cb.and(p, cb.equal( root.get( AppCategoryPermission_.usedObjectName ),personName ) );
-		}
-		if( permission != null && !permission.isEmpty() ){
-			p = cb.and(p, cb.equal( root.get( AppCategoryPermission_.permission ),permission ) );
-		}
-		cq.select( root.get( AppCategoryPermission_.id ) );
-		return em.createQuery( cq.where(p) ).getResultList();
-	}
-
-	public List<String> listAppInfoIdsByPermission( List<String> queryObjectNames, String queryObjectType, String objectType, String permission) throws Exception {
-		if( queryObjectNames == null || queryObjectNames.isEmpty() ){
-			throw new Exception( "queryObjectNames is null." );
-		}
-		EntityManager em = this.entityManagerContainer().get( AppCategoryPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery( String.class );
-		Root<AppCategoryPermission> root = cq.from( AppCategoryPermission.class );
-		Predicate p = root.get( AppCategoryPermission_.usedObjectName ).in( queryObjectNames );
-		if( queryObjectType != null && !queryObjectType.isEmpty() ){
-			p = cb.and(p, cb.equal( root.get( AppCategoryPermission_.usedObjectType ),queryObjectType ) );
-		}
-		if( objectType != null && !objectType.isEmpty() ){
-			p = cb.and(p, cb.equal( root.get( AppCategoryPermission_.objectType ),objectType ) );
-		}
-		if( permission != null && !permission.isEmpty() ){
-			p = cb.and(p, cb.equal( root.get( AppCategoryPermission_.permission ),permission ) );
-		}
-		cq.select( root.get( AppCategoryPermission_.objectId ) );
-		return em.createQuery( cq.where(p) ).getResultList();
-	}	
-}

+ 0 - 181
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/RescissoryClass_DocumentPermissionFactory.java

@@ -1,181 +0,0 @@
-package com.x.cms.assemble.control.factory;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import com.x.cms.assemble.control.AbstractFactory;
-import com.x.cms.assemble.control.Business;
-import com.x.cms.core.entity.DocumentPermission;
-import com.x.cms.core.entity.DocumentPermission_;
-import com.x.cms.core.entity.tools.DateOperation;
-
-/**
- * 文档权限基础功能服务类
- * 
- * @author O2LEE
- */
-public class RescissoryClass_DocumentPermissionFactory extends AbstractFactory {
-
-	public RescissoryClass_DocumentPermissionFactory(Business business) throws Exception {
-		super(business);
-	}
-	
-	//@MethodDescribe("列示指定Id的DocumentPermission信息列表")
-	public List<DocumentPermission> list( List<String> ids ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( DocumentPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<DocumentPermission> cq = cb.createQuery( DocumentPermission.class );
-		Root<DocumentPermission> root = cq.from( DocumentPermission.class );
-		Predicate p = root.get( DocumentPermission_.id).in( ids );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	public List<String> listIds(String docId, List<String> permissionCodes, String permission) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( DocumentPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery( String.class );
-		Root<DocumentPermission> root = cq.from( DocumentPermission.class );
-		Predicate p = cb.equal( root.get( DocumentPermission_.documentId ), docId );
-		p = cb.and( p, cb.equal( root.get( DocumentPermission_.permission ), permission ) );
-		p = cb.and( p, root.get( DocumentPermission_.permissionObjectCode ).in( permissionCodes ) );
-		cq.select( root.get( DocumentPermission_.id ));
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	//@MethodDescribe("根据指定的信息查询文档权限记录ID列表")
-	public List<String> listIds( String docId, String permission, String permissionObjectType, String permissionObjectCode ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( DocumentPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery( String.class );
-		Root<DocumentPermission> root = cq.from( DocumentPermission.class );
-		Predicate p = cb.equal( root.get( DocumentPermission_.documentId ), docId );
-		p = cb.and( p, cb.equal( root.get( DocumentPermission_.permission ), permission ) );
-		p = cb.and( p, cb.equal( root.get( DocumentPermission_.permissionObjectType ), permissionObjectType ) );
-		p = cb.and( p, cb.equal( root.get( DocumentPermission_.permissionObjectCode ), permissionObjectCode ) );
-		cq.select( root.get( DocumentPermission_.id ));
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	//@MethodDescribe("根据文档ID查询文档所有的权限信息ID列表")
-	public List<String> listIdsByDocumentId( String docId ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( DocumentPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery( String.class );
-		Root<DocumentPermission> root = cq.from( DocumentPermission.class );
-		Predicate p = cb.equal( root.get( DocumentPermission_.documentId ), docId );
-		cq.select( root.get( DocumentPermission_.id ));
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	//@MethodDescribe("查询未被更新过的文档权限信息ID列表")
-	public List<String> listNoModifyIds(String docId, String updateFlag) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( DocumentPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery( String.class );
-		Root<DocumentPermission> root = cq.from( DocumentPermission.class );
-		Predicate p = cb.equal( root.get( DocumentPermission_.documentId ), docId );
-		p = cb.and( p, cb.notEqual( root.get( DocumentPermission_.updateFlag ), updateFlag ) );
-		cq.select( root.get( DocumentPermission_.id ));
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	//@MethodDescribe("根据条件查询出用户可访问的文档ID列表,按发布时间倒排序,取前500条")
-	public List<String> lisViewableDocIdsWithFilter1( List<String> appIdList,
-			List<String> categoryIdList, List<String> publisherList, String title, List<String> createDateList,
-			List<String> publishDateList, List<String> statusList, List<String> permissionObjectCodeList, 
-			List<String> viewableCategoryIds,
-			Integer maxResultCount ) throws Exception {
-		Date startDate = null;
-		Date endDate = null;
-		List<String> ids = new ArrayList<>();
-		List<DocumentPermission> permissions = null;
-		DateOperation dateOperation = new DateOperation();
-		EntityManager em = this.entityManagerContainer().get( DocumentPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<DocumentPermission> cq = cb.createQuery( DocumentPermission.class );
-		Root<DocumentPermission> root = cq.from( DocumentPermission.class );
-	
-		//先圈定用户能访问的文档
-		Predicate permissionWhere = root.get( DocumentPermission_.permissionObjectCode ).in( permissionObjectCodeList );
-		
-		//所有人可访问的文档
-		permissionWhere = cb.or( permissionWhere, cb.equal( root.get( DocumentPermission_.permissionObjectCode ), "所有人") );
-		
-		//或者用户可管理的分类中所有的文档
-		permissionWhere = cb.or( permissionWhere, root.get( DocumentPermission_.categoryId ).in( viewableCategoryIds ) );
-		
-		Predicate p = cb.isNotNull( root.get( DocumentPermission_.id ) );
-		if( appIdList != null && !appIdList.isEmpty() ){
-			p = cb.and( p, root.get( DocumentPermission_.appId ).in( appIdList ));
-		}
-		if( categoryIdList != null && !categoryIdList.isEmpty() ){
-			p = cb.and( p, root.get( DocumentPermission_.categoryId ).in( categoryIdList ));
-		}
-		if( publisherList != null && !publisherList.isEmpty() ){
-			p = cb.and( p, root.get( DocumentPermission_.publisher ).in( publisherList ));
-		}
-		if( title != null && !title.isEmpty() ){
-			p = cb.and( p, cb.like( root.get( DocumentPermission_.title ), "%" + title + "%" ));
-		}
-		if( statusList == null || statusList.isEmpty() ){
-			p = cb.and( p, cb.equal(root.get( DocumentPermission_.documentStatus ), "published"));
-		}else{
-			p = cb.and( p, root.get( DocumentPermission_.documentStatus ).in( statusList ));
-		}
-		
-		if( createDateList != null && !createDateList.isEmpty() ){
-			if ( createDateList.size() == 1 ) {// 从开始时间(yyyy-MM-DD),到现在				
-				startDate = dateOperation.getDateFromString( createDateList.get(0).toString() );
-				endDate = new Date();
-			}else if( createDateList.size() == 2 ){// 从开始时间到结束时间(yyyy-MM-DD)				
-				startDate = dateOperation.getDateFromString( createDateList.get(0).toString());
-				endDate = dateOperation.getDateFromString( createDateList.get(1).toString());
-			}
-			p = cb.and( p, cb.between( root.get( DocumentPermission_.docCreateDate ), startDate, endDate ) );
-		}
-		
-		if( publishDateList != null && !publishDateList.isEmpty() ){
-			if ( publishDateList.size() == 1 ) {
-				// 从开始时间(yyyy-MM-DD),到现在
-				startDate = dateOperation.getDateFromString( publishDateList.get(0).toString() );
-				endDate = new Date();
-			}else if( publishDateList.size() == 2 ){
-				// 从开始时间到结束时间(yyyy-MM-DD)
-				startDate = dateOperation.getDateFromString( publishDateList.get(0).toString());
-				endDate = dateOperation.getDateFromString( publishDateList.get(1).toString());
-			}
-			p = cb.and( p, cb.between( root.get( DocumentPermission_.publishDate ), startDate, endDate ) );
-		}
-		
-		cq.orderBy( cb.desc( root.get( DocumentPermission_.publishDate ) ) );
-		
-		if( maxResultCount == null || maxResultCount == 0 ){
-			maxResultCount = 500;
-		}
-		
-		permissions = em.createQuery(cq.where( permissionWhere, p )).setMaxResults( maxResultCount ).getResultList();
-		if( permissions != null && !permissions.isEmpty() ){
-			for( DocumentPermission permission : permissions ){
-				if( !ids.contains( permission.getDocumentId() )){
-					ids.add( permission.getDocumentId() );
-				}
-			}
-		}
-		return ids;
-	}
-
-	public List<String> getWithNullScartchString( int maxCount ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( DocumentPermission.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery( String.class );
-		Root<DocumentPermission> root = cq.from( DocumentPermission.class );
-		Predicate p = cb.isNull( root.get( DocumentPermission_.scratchString ) );
-		cq.select( root.get( DocumentPermission_.id ));
-		return em.createQuery( cq.where(p) ).setMaxResults( maxCount ).getResultList();
-	}
-}

+ 0 - 50
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/factory/ReviewFactory.java

@@ -1,50 +0,0 @@
-package com.x.cms.assemble.control.factory;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import com.x.base.core.project.exception.ExceptionWhen;
-import com.x.cms.assemble.control.AbstractFactory;
-import com.x.cms.assemble.control.Business;
-import com.x.cms.core.entity.Review;
-import com.x.cms.core.entity.Review_;
-
-/**
- * Review管理表基础功能服务类
- * 
- * @author O2LEE
- */
-public class ReviewFactory extends AbstractFactory {
-
-	public ReviewFactory( Business business ) throws Exception {
-		super(business);
-	}
-	
-	public Review get( String id ) throws Exception {
-		return this.entityManagerContainer().find( id, Review.class, ExceptionWhen.none );
-	}
-	
-	public List<String> listWithDocument( String docId ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( Review.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<Review> root = cq.from(Review.class);
-		cq.select(root.get(Review_.id));
-		Predicate p = cb.equal( root.get(Review_.documentId), docId );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-//	public List<Review> list(List<String> ids) throws Exception {
-//		EntityManager em = this.entityManagerContainer().get( Review.class );
-//		CriteriaBuilder cb = em.getCriteriaBuilder();
-//		CriteriaQuery<Review> cq = cb.createQuery( Review.class );
-//		Root<Review> root = cq.from( Review.class );
-//		Predicate p = root.get(Review_.id).in(ids);
-//		return em.createQuery(cq.where(p)).getResultList();
-//	}
-}

+ 2 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/ActionApplication.java

@@ -9,6 +9,7 @@ import com.x.cms.assemble.control.jaxrs.appdict.AppDictAction;
 import com.x.cms.assemble.control.jaxrs.appdict.AppDictAnonymousAction;
 import com.x.cms.assemble.control.jaxrs.appdictdesign.AppDictDesignAction;
 import com.x.cms.assemble.control.jaxrs.appinfo.AppInfoAction;
+import com.x.cms.assemble.control.jaxrs.appinfo.AppInfoAnonymousAction;
 import com.x.cms.assemble.control.jaxrs.categoryinfo.CategoryInfoAction;
 import com.x.cms.assemble.control.jaxrs.categoryinfo.CategoryInfoAnonymousAction;
 import com.x.cms.assemble.control.jaxrs.data.DataAction;
@@ -70,6 +71,7 @@ public class ActionApplication extends AbstractActionApplication {
 		this.classes.add(OutputAction.class);
 		this.classes.add(PermissionAction.class);
 		
+		this.classes.add(AppInfoAnonymousAction.class);
 		this.classes.add(AppDictAnonymousAction.class);
 		this.classes.add(CategoryInfoAnonymousAction.class);
 		this.classes.add(DocumentAnonymousAction.class);

+ 75 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/ActionGetAnonymous.java

@@ -0,0 +1,75 @@
+package com.x.cms.assemble.control.jaxrs.appinfo;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.x.base.core.project.cache.ApplicationCache;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.cms.core.entity.AppInfo;
+
+import net.sf.ehcache.Element;
+
+public class ActionGetAnonymous extends BaseAction {
+
+	private static  Logger logger = LoggerFactory.getLogger( ActionGetAnonymous.class );
+	
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String flag ) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wo wo = null;
+		AppInfo appInfo = null;
+		Boolean check = true;
+		
+		if( StringUtils.isEmpty(flag) ){
+			check = false;
+			Exception exception = new ExceptionAppInfoIdEmpty();
+			result.error( exception );
+		}
+		
+		String cacheKey = ApplicationCache.concreteCacheKey( flag );
+		Element element = cache.get( cacheKey );
+		
+		if (( null != element ) && ( null != element.getObjectValue()) ) {
+			wo = ( Wo ) element.getObjectValue();
+			result.setData( wo );
+		} else {
+			if( check ){
+				try {
+					appInfo = appInfoServiceAdv.getWithFlag( flag );
+					if( appInfo == null ){
+						check = false;
+						Exception exception = new ExceptionAppInfoNotExists( flag );
+						result.error( exception );
+					}else {
+						if( !appInfo.getAnonymousAble() ){
+							check = false;
+							Exception exception = new ExceptionAppInfoAccessDenied("栏目信息不允许匿名访问!");
+							result.error( exception );
+						}
+					}
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionAppInfoProcess( e, "根据指定flag查询应用栏目信息对象时发生异常。flag:" + flag );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}
+			if( check ){
+				try {
+					wo = Wo.copier.copy( appInfo );
+					cache.put(new Element( cacheKey, wo ));
+					result.setData( wo );
+				} catch (Exception e) {
+					Exception exception = new ExceptionAppInfoProcess( e, "将查询出来的应用栏目信息对象转换为可输出的数据信息时发生异常。" );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}
+		}
+		
+		return result;
+	}
+}

+ 127 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/ActionListNextWithFilterAnonymous.java

@@ -0,0 +1,127 @@
+package com.x.cms.assemble.control.jaxrs.appinfo;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.project.annotation.FieldDescribe;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.jaxrs.EqualsTerms;
+import com.x.base.core.project.jaxrs.InTerms;
+import com.x.base.core.project.jaxrs.LikeTerms;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+
+public class ActionListNextWithFilterAnonymous extends BaseAction {
+
+	private static Logger logger = LoggerFactory.getLogger(ActionListNextWithFilterAnonymous.class);
+
+	protected ActionResult<List<Wo>> execute(HttpServletRequest request, EffectivePerson effectivePerson, String id,
+			Integer count, JsonElement jsonElement) throws Exception {
+		ActionResult<List<Wo>> result = new ActionResult<>();
+		EqualsTerms equals = new EqualsTerms();
+		InTerms ins = new InTerms();
+		LikeTerms likes = new LikeTerms();
+		Wi wi = null;
+		Boolean check = true;
+
+		try {
+			wi = this.convertToWrapIn(jsonElement, Wi.class);
+		} catch (Exception e) {
+			check = false;
+			Exception exception = new ExceptionAppInfoProcess(e, "系统在将JSON信息转换为对象时发生异常。JSON:" + jsonElement.toString());
+			result.error(exception);
+			logger.error(e, effectivePerson, request, null);
+		}
+
+		if (check) {
+			if (wi == null) {
+				result.setCount(0L);
+				result.setData(new ArrayList<Wo>());
+				return result;
+			}
+			if (id == null) {
+				id = "(0)";
+			}
+			if (count == null) {
+				count = 20;
+			}
+			if ((null != wi.getAppIdList()) && (!wi.getAppIdList().isEmpty())) {
+				ins.put("id", wi.getAppIdList());
+			}
+			if ((null != wi.getCreatorList()) && (!wi.getCreatorList().isEmpty())) {
+				ins.put("creatorUid", wi.getCreatorList());
+			}
+			if (StringUtils.isNotEmpty(wi.getKey())) {
+				String key = StringUtils.trim(StringUtils.replace(wi.getKey(), "\u3000", " "));
+				if (StringUtils.isNotEmpty(key)) {
+					likes.put("appName", key);
+				}
+			}
+			
+			equals.put( "anonymousAble", true );
+			
+			try {
+				result = this.standardListNext(Wo.copier, id, count, "sequence", equals, null, likes, ins, null, null, null, null, true, DESC);
+			} catch (Exception e) {
+				result.error(e);
+				logger.warn("系统在分页查询栏目信息列表时发生异常。");
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		return result;
+	}
+
+	public class Wi {
+
+		@FieldDescribe("作为过滤条件的CMS应用ID, 可多个, String数组.")
+		private List<String> appIdList;
+
+		@FieldDescribe("作为过滤条件的创建者姓名, 可多个, String数组.")
+		private List<String> creatorList;
+
+		@FieldDescribe("作为过滤条件的CMS应用关键字, 通常是应用名称, String, 模糊查询.")
+		private String key;
+
+		@FieldDescribe("文档类型:全部 | 信息 | 数据")
+		private String documentType = "信息";
+
+		public List<String> getAppIdList() {
+			return appIdList;
+		}
+
+		public void setAppIdList(List<String> appIdList) {
+			this.appIdList = appIdList;
+		}
+
+		public List<String> getCreatorList() {
+			return creatorList;
+		}
+
+		public void setCreatorList(List<String> creatorList) {
+			this.creatorList = creatorList;
+		}
+
+		public String getKey() {
+			return key;
+		}
+
+		public void setKey(String key) {
+			this.key = key;
+		}
+
+		public String getDocumentType() {
+			return documentType;
+		}
+
+		public void setDocumentType(String documentType) {
+			this.documentType = documentType;
+		}
+
+	}
+}

+ 0 - 70
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/ActionUpdateReviewForce.java

@@ -1,70 +0,0 @@
-package com.x.cms.assemble.control.jaxrs.appinfo;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoId;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.cms.core.entity.AppInfo;
-
-public class ActionUpdateReviewForce extends BaseAction {
-
-	private static  Logger logger = LoggerFactory.getLogger( ActionUpdateReviewForce.class );
-	
-	protected ActionResult<WoId> execute( HttpServletRequest request, EffectivePerson effectivePerson, String flag ) throws Exception {
-		ActionResult<WoId> result = new ActionResult<>();
-		AppInfo appInfo = null;
-		Boolean check = true;
-		
-		if( StringUtils.isEmpty(flag) ){
-			check = false;
-			Exception exception = new ExceptionAppInfoIdEmpty();
-			result.error( exception );
-		}
-		
-		if( check ){
-			try {
-				appInfo = appInfoServiceAdv.getWithFlag( flag );
-				if( appInfo == null ){
-					check = false;
-					Exception exception = new ExceptionAppInfoNotExists( flag );
-					result.error( exception );
-				}
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ExceptionAppInfoProcess( e, "根据指定flag查询应用栏目信息对象时发生异常。flag:" + flag );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		
-		if( check ){
-			try {
-				permissionOperateService.refreshReviewWithAppId( appInfo.getId() );
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ExceptionAppInfoProcess( e, "根据指定强制更新信息存根Review信息时发生异常。ID:" + appInfo.getId() );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		
-		if( check ){
-			try {
-				WoId wo = new WoId();
-				wo.setId( appInfo.getId() );
-				result.setData( wo );
-			} catch (Exception e) {
-				Exception exception = new ExceptionAppInfoProcess( e, "将查询出来的应用栏目信息对象转换为可输出的数据信息时发生异常。" );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		
-		return result;
-	}
-}

+ 0 - 20
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/AppInfoAction.java

@@ -29,7 +29,6 @@ import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.HttpMediaType;
 import com.x.base.core.project.jaxrs.ResponseFactory;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.jaxrs.WoId;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
 
@@ -99,25 +98,6 @@ public class AppInfoAction extends StandardJaxrsAction {
 		}
 		return ResponseFactory.getDefaultActionResultResponse(result);
 	}
-	
-	@JaxrsMethodDescribe(value = "根据标识强制更新指定的栏目Review.", action = ActionUpdateReviewForce.class)
-	@GET
-	@Path("review/{flag}/update")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public Response updateReviewForce(@Context HttpServletRequest request, @JaxrsParameterDescribe("栏目ID") @PathParam("flag") String flag) {
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		ActionResult<WoId> result = new ActionResult<>();
-		try {
-			result = new ActionUpdateReviewForce().execute( request, effectivePerson, flag );
-		} catch (Exception e) {
-			result = new ActionResult<>();
-			Exception exception = new ExceptionAppInfoProcess(e, "根据指定ID查询应用栏目信息对象时发生异常。flag:" + flag );
-			result.error(exception);
-			logger.error(e, effectivePerson, request, null);
-		}
-		return ResponseFactory.getDefaultActionResultResponse(result);
-	}
 
 	@JaxrsMethodDescribe(value = "根据别名获取信息栏目信息对象.", action = ActionGetByAlias.class)
 	@GET

+ 74 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/AppInfoAnonymousAction.java

@@ -0,0 +1,74 @@
+package com.x.cms.assemble.control.jaxrs.appinfo;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.project.annotation.JaxrsDescribe;
+import com.x.base.core.project.annotation.JaxrsMethodDescribe;
+import com.x.base.core.project.annotation.JaxrsParameterDescribe;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.http.HttpMediaType;
+import com.x.base.core.project.jaxrs.ResponseFactory;
+import com.x.base.core.project.jaxrs.StandardJaxrsAction;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+
+@JaxrsDescribe("匿名栏目信息访问")
+@Path("anonymous/appinfo")
+public class AppInfoAnonymousAction extends StandardJaxrsAction {
+
+	private static Logger logger = LoggerFactory.getLogger(AppInfoAnonymousAction.class);
+
+	@JaxrsMethodDescribe(value = "根据标识获取信息栏目信息对象.", action = ActionGetAnonymous.class)
+	@GET
+	@Path("{flag}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public Response get(@Context HttpServletRequest request, @JaxrsParameterDescribe("栏目ID") @PathParam("flag") String flag) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		ActionResult<BaseAction.Wo> result = new ActionResult<>();
+		try {
+			result = new ActionGetAnonymous().execute( request, effectivePerson, flag );
+		} catch (Exception e) {
+			result = new ActionResult<>();
+			Exception exception = new ExceptionAppInfoProcess(e, "根据指定ID查询应用栏目信息对象时发生异常。flag:" + flag );
+			result.error(exception);
+			logger.error(e, effectivePerson, request, null);
+		}
+		return ResponseFactory.getDefaultActionResultResponse(result);
+	}
+
+	@JaxrsMethodDescribe(value = "列示根据过滤条件的信息栏目信息,下一页.", action = ActionListNextWithFilterAnonymous.class)
+	@PUT
+	@Path("filter/list/{id}/next/{count}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public Response listNextWithFilter(@Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("最后一条信息ID,如果是第一页,则可以用(0)代替") @PathParam("id") String id, 
+			@JaxrsParameterDescribe("每页显示的条目数量") @PathParam("count") Integer count, 
+			JsonElement jsonElement) {
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		ActionResult<List<ActionListNextWithFilterAnonymous.Wo>> result = new ActionResult<>();
+		try {
+			result = new ActionListNextWithFilterAnonymous().execute(request, effectivePerson, id, count, jsonElement );
+		} catch (Exception e) {
+			result = new ActionResult<>();
+			Exception exception = new ExceptionAppInfoProcess(e, "查询栏目信息对象时发生异常");
+			result.error(exception);
+			logger.error(e, effectivePerson, request, null);
+		}
+		return ResponseFactory.getDefaultActionResultResponse(result);
+	}
+}

+ 10 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/BaseAction.java

@@ -190,6 +190,16 @@ public class BaseAction extends StandardJaxrsAction {
 		
 	public static class Wo extends AppInfo {
 		
+		private Long rank;
+
+		public Long getRank() {
+			return rank;
+		}
+
+		public void setRank(Long rank) {
+			this.rank = rank;
+		}
+		
 		private static final long serialVersionUID = -5076990764713538973L;
 		
 		public static List<String> Excludes = new ArrayList<String>();

+ 4 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/appinfo/ExceptionAppInfoAccessDenied.java

@@ -5,6 +5,10 @@ import com.x.base.core.project.exception.PromptException;
 class ExceptionAppInfoAccessDenied extends PromptException {
 	private static final long serialVersionUID = 1859164370743532895L;
 
+	ExceptionAppInfoAccessDenied( String message ) {
+		super( message );
+	}
+	
 	ExceptionAppInfoAccessDenied( Throwable e, String message ) {
 		super( message, e );
 	}

+ 105 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/ActionGetAnonymous.java

@@ -0,0 +1,105 @@
+package com.x.cms.assemble.control.jaxrs.categoryinfo;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.annotation.FieldDescribe;
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.cache.ApplicationCache;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.base.core.project.tools.ListTools;
+import com.x.cms.core.entity.CategoryInfo;
+
+import net.sf.ehcache.Element;
+
+public class ActionGetAnonymous extends BaseAction {
+
+	private static  Logger logger = LoggerFactory.getLogger( ActionGetAnonymous.class );
+	
+	protected ActionResult<Wo> execute( HttpServletRequest request, String flag, EffectivePerson effectivePerson ) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wo wo = null;
+		CategoryInfo categoryInfo = null;
+		Boolean check = true;
+		
+		if( StringUtils.isEmpty( flag ) ){
+			check = false;
+			Exception exception = new ExceptionIdEmpty();
+			result.error( exception );
+		}
+		
+		String cacheKey = ApplicationCache.concreteCacheKey( flag );
+		Element element = cache.get(cacheKey);
+		
+		if ((null != element) && ( null != element.getObjectValue()) ) {
+			wo = ( Wo ) element.getObjectValue();
+			result.setData( wo );
+		} else {
+			if( check ){
+				try {
+					categoryInfo = categoryInfoServiceAdv.getWithFlag( flag );
+					if( categoryInfo == null ){
+						check = false;
+						Exception exception = new ExceptionCategoryInfoNotExists( flag );
+						result.error( exception );
+					}else {
+						if( !categoryInfo.getAnonymousAble() ){
+							check = false;
+							Exception exception = new ExceptionCategoryInfoAccessDenied("分类信息不允许匿名访问!");
+							result.error( exception );
+						}
+					}
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionCategoryInfoProcess( e, "根据ID查询分类信息对象时发生异常。Flag:" + flag );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}
+			
+			if( check ){
+				try {
+					wo = Wo.copier.copy( categoryInfo );
+					wo.setExtContent( categoryInfoServiceAdv.getExtContentWithId( wo.getId() ));					
+					cache.put(new Element( cacheKey, wo ));
+					result.setData( wo );
+				} catch ( Exception e ) {
+					check = false;
+					Exception exception = new ExceptionCategoryInfoProcess( e, "将查询出来的分类信息对象转换为可输出的数据信息时发生异常。" );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}
+		}
+		return result;
+	}
+	
+	public static class Wo extends CategoryInfo {
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>();
+		
+		@FieldDescribe("扩展信息JSON内容")
+		private String extContent = null;
+
+		static WrapCopier<CategoryInfo, Wo> copier = WrapCopierFactory.wo( CategoryInfo.class, Wo.class, null, ListTools.toList(JpaObject.FieldsInvisible));
+
+		public String getExtContent() {
+			return extContent;
+		}
+
+		public void setExtContent(String extContent) {
+			this.extContent = extContent;
+		}
+	}
+
+}

+ 171 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/ActionListNextWithFilterAnonymous.java

@@ -0,0 +1,171 @@
+package com.x.cms.assemble.control.jaxrs.categoryinfo;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.annotation.FieldDescribe;
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.gson.GsonPropertyObject;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.jaxrs.EqualsTerms;
+import com.x.base.core.project.jaxrs.InTerms;
+import com.x.base.core.project.jaxrs.LikeTerms;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.base.core.project.tools.ListTools;
+import com.x.cms.core.entity.CategoryInfo;
+
+public class ActionListNextWithFilterAnonymous extends BaseAction {
+
+	private static Logger logger = LoggerFactory.getLogger(ActionListNextWithFilterAnonymous.class);
+
+	protected ActionResult<List<Wo>> execute(HttpServletRequest request, EffectivePerson effectivePerson, String id,
+			Integer count, JsonElement jsonElement) throws Exception {
+		ActionResult<List<Wo>> result = new ActionResult<>();
+		EqualsTerms equals = new EqualsTerms();
+		InTerms ins = new InTerms();
+		LikeTerms likes = new LikeTerms();
+		Wi wi = null;
+		Boolean check = true;
+
+		try {
+			wi = this.convertToWrapIn(jsonElement, Wi.class);
+		} catch (Exception e) {
+			check = false;
+			Exception exception = new ExceptionCategoryInfoProcess(e,
+					"系统在将JSON信息转换为对象时发生异常。JSON:" + jsonElement.toString());
+			result.error(exception);
+			logger.error(e, effectivePerson, request, null);
+		}
+
+		if (check) {
+			if (null != wi.getAppIdList() && !wi.getAppIdList().isEmpty()) {
+				ins.put("appId", wi.getAppIdList());
+			}
+			if (null != wi.getCategoryIdList() && !wi.getCategoryIdList().isEmpty()) {
+				ins.put("id", wi.getCategoryIdList());
+			}
+			if (null != wi.getCreatorList() && !wi.getCreatorList().isEmpty()) {
+				ins.put("creatorPerson", wi.getCreatorList());
+			}
+			if (StringUtils.isNotEmpty(wi.getKey())) {
+				String key = StringUtils.trim(StringUtils.replace(wi.getKey(), "\u3000", " "));
+				if (StringUtils.isNotEmpty(key)) {
+					likes.put("title", key);
+				}
+			}
+		}
+
+		equals.put( "anonymousAble", true );
+		
+		if (check) {
+			try {
+				result = this.standardListNext(Wo.copier, id, count, "sequence", equals, null, likes, ins, null, null,
+						null, null, true, DESC);
+			} catch (Exception e) {
+				check = false;
+				result.error(e);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+
+		return result;
+	}
+
+	public static class Wo extends CategoryInfo {
+
+		private Long rank;
+
+		public Long getRank() {
+			return rank;
+		}
+
+		public void setRank(Long rank) {
+			this.rank = rank;
+		} 
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+
+		public static List<String> Excludes = new ArrayList<String>();
+
+		static WrapCopier<CategoryInfo, Wo> copier = WrapCopierFactory.wo(CategoryInfo.class, Wo.class, null,
+				ListTools.toList(JpaObject.FieldsInvisible));
+
+		@FieldDescribe("扩展信息JSON内容")
+		private String extContent = null;
+
+		public String getExtContent() {
+			return extContent;
+		}
+
+		public void setExtContent(String extContent) {
+			this.extContent = extContent;
+		}
+	}
+
+	public static class Wi extends GsonPropertyObject {
+
+		@FieldDescribe("作为过滤条件的信息内容管理应用ID列表, 可多个, String数组.")
+		private List<String> appIdList;
+
+		@FieldDescribe("作为过滤条件的内容管理分类ID列表, 可多个, String数组.")
+		private List<String> categoryIdList;
+
+		@FieldDescribe("作为过滤条件的创建者姓名列表, 可多个, String数组.")
+		private List<String> creatorList;
+
+		@FieldDescribe("作为过滤条件的内容管理应用关键字, 通常是应用名称, String, 模糊查询.")
+		private String key;
+
+		@FieldDescribe("文档类型:全部 | 信息 | 数据")
+		private String documentType = "信息";
+
+		public List<String> getAppIdList() {
+			return appIdList;
+		}
+
+		public void setAppIdList(List<String> appIdList) {
+			this.appIdList = appIdList;
+		}
+
+		public List<String> getCategoryIdList() {
+			return categoryIdList;
+		}
+
+		public void setCategoryIdList(List<String> categoryIdList) {
+			this.categoryIdList = categoryIdList;
+		}
+
+		public List<String> getCreatorList() {
+			return creatorList;
+		}
+
+		public void setCreatorList(List<String> creatorList) {
+			this.creatorList = creatorList;
+		}
+
+		public String getKey() {
+			return key;
+		}
+
+		public void setKey(String key) {
+			this.key = key;
+		}
+
+		public String getDocumentType() {
+			return documentType;
+		}
+
+		public void setDocumentType(String documentType) {
+			this.documentType = documentType;
+		}
+	}
+}

+ 0 - 70
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/ActionUpdateReviewForce.java

@@ -1,70 +0,0 @@
-package com.x.cms.assemble.control.jaxrs.categoryinfo;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoId;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.cms.core.entity.CategoryInfo;
-
-public class ActionUpdateReviewForce extends BaseAction {
-
-	private static  Logger logger = LoggerFactory.getLogger( ActionUpdateReviewForce.class );
-	
-	protected ActionResult<WoId> execute( HttpServletRequest request, EffectivePerson effectivePerson, String flag ) throws Exception {
-		ActionResult<WoId> result = new ActionResult<>();
-		CategoryInfo categoryInfo = null;
-		Boolean check = true;
-		
-		if( StringUtils.isEmpty( flag ) ){
-			check = false;
-			Exception exception = new ExceptionIdEmpty();
-			result.error( exception );
-		}
-		
-		if( check ){
-			try {
-				categoryInfo = categoryInfoServiceAdv.getWithFlag( flag );
-				if( categoryInfo == null ){
-					check = false;
-					Exception exception = new ExceptionCategoryInfoNotExists( flag );
-					result.error( exception );
-				}
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ExceptionCategoryInfoProcess( e, "根据ID查询分类信息对象时发生异常。Flag:" + flag );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		
-		if( check ){
-			try {
-				permissionOperateService.refreshReviewWithCategoryId( categoryInfo.getId() );
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ExceptionCategoryInfoProcess( e, "根据指定分类ID强制更新信息存根Review信息时发生异常。ID:" + categoryInfo.getId() );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		
-		if( check ){
-			try {
-				WoId wo = new WoId();
-				wo.setId( categoryInfo.getId() );
-				result.setData( wo );
-			} catch ( Exception e ) {
-				check = false;
-				Exception exception = new ExceptionCategoryInfoProcess( e, "将查询出来的分类信息对象转换为可输出的数据信息时发生异常。" );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}		
-		return result;
-	}
-}

+ 0 - 20
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/CategoryInfoAction.java

@@ -24,7 +24,6 @@ import com.x.base.core.project.http.EffectivePerson;
 import com.x.base.core.project.http.HttpMediaType;
 import com.x.base.core.project.jaxrs.ResponseFactory;
 import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.jaxrs.WoId;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
 
@@ -238,25 +237,6 @@ public class CategoryInfoAction extends StandardJaxrsAction{
 		return ResponseFactory.getDefaultActionResultResponse( result );
 	}
 	
-	@JaxrsMethodDescribe(value = "根据标识强制更新指定的分类Review.", action = ActionUpdateReviewForce.class)
-	@GET
-	@Path("review/{flag}/update")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public Response updateReviewForce(@Context HttpServletRequest request, @JaxrsParameterDescribe("分类ID") @PathParam("flag") String flag) {
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		ActionResult<WoId> result = new ActionResult<>();
-		try {
-			result = new ActionUpdateReviewForce().execute( request, effectivePerson, flag );
-		} catch (Exception e) {
-			result = new ActionResult<>();
-			Exception exception = new ExceptionCategoryInfoProcess(e, "根据指定ID查询分类栏目信息对象时发生异常。flag:" + flag );
-			result.error(exception);
-			logger.error(e, effectivePerson, request, null);
-		}
-		return ResponseFactory.getDefaultActionResultResponse(result);
-	}
-	
 	@JaxrsMethodDescribe(value = "根据别名获取分类信息对象.", action = ActionGet.class)
 	@GET
 	@Path("alias/{alias}")

+ 45 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/CategoryInfoAnonymousAction.java

@@ -5,6 +5,7 @@ import java.util.List;
 import javax.servlet.http.HttpServletRequest;
 import javax.ws.rs.Consumes;
 import javax.ws.rs.GET;
+import javax.ws.rs.PUT;
 import javax.ws.rs.Path;
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
@@ -12,6 +13,7 @@ import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
+import com.google.gson.JsonElement;
 import com.x.base.core.project.annotation.JaxrsDescribe;
 import com.x.base.core.project.annotation.JaxrsMethodDescribe;
 import com.x.base.core.project.annotation.JaxrsParameterDescribe;
@@ -30,6 +32,49 @@ public class CategoryInfoAnonymousAction extends StandardJaxrsAction{
 	
 	private static  Logger logger = LoggerFactory.getLogger( CategoryInfoAnonymousAction.class );
 	
+	@JaxrsMethodDescribe(value = "根据Flag获取分类信息对象.", action = ActionGetAnonymous.class)
+	@GET
+	@Path("{flag}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public Response get(@Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("栏目标识") @PathParam("flag") String flag) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<ActionGetAnonymous.Wo> result = null;
+		try {
+			result = new ActionGetAnonymous().execute( request, flag, effectivePerson );
+		} catch (Exception e) {
+			result = new ActionResult<>();
+			Exception exception = new ExceptionCategoryInfoProcess( e, "根据ID查询分类信息对象时发生异常。flag:" + flag );
+			result.error( exception );
+			logger.error( e, effectivePerson, request, null);
+		}
+		return ResponseFactory.getDefaultActionResultResponse( result );
+	}
+	
+	@JaxrsMethodDescribe(value = "列示根据过滤条件的信息分类,下一页.", action = ActionListNextWithFilterAnonymous.class)
+	@PUT
+	@Path("filter/list/{id}/next/{count}/app/{appId}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public Response listNextWithFilter(@Context HttpServletRequest request, 
+			@JaxrsParameterDescribe("最后一条信息ID,如果是第一页,则可以用(0)代替") @PathParam("id") String id, 
+			@JaxrsParameterDescribe("每页显示的条目数量") @PathParam("count") Integer count, 
+			@JaxrsParameterDescribe("栏目ID")  @PathParam("appId") String appId, 
+			JsonElement jsonElement ) {
+		EffectivePerson effectivePerson = this.effectivePerson( request );
+		ActionResult<List<ActionListNextWithFilterAnonymous.Wo>> result = null;
+		try {
+			result = new ActionListNextWithFilterAnonymous().execute( request, effectivePerson, id, count, jsonElement);
+		} catch (Exception e) {
+			result = new ActionResult<>();
+			Exception exception = new ExceptionCategoryInfoProcess( e, "列示根据过滤条件的信息分类时发生异常。" );
+			result.error( exception );
+			logger.error( e, effectivePerson, request, null);
+		}
+		return ResponseFactory.getDefaultActionResultResponse( result );
+	}
+	
 	@JaxrsMethodDescribe(value = "获取用户有查看访问文章信息的所有分类列表.", action = ActionListWhatICanView_Article.class)
 	@GET
 	@Path("list/view/app/{appId}")

+ 19 - 0
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/categoryinfo/ExceptionCategoryInfoAccessDenied.java

@@ -0,0 +1,19 @@
+package com.x.cms.assemble.control.jaxrs.categoryinfo;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionCategoryInfoAccessDenied extends PromptException {
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionCategoryInfoAccessDenied( String message ) {
+		super( message );
+	}
+	
+	ExceptionCategoryInfoAccessDenied( Throwable e, String message ) {
+		super( message, e );
+	}
+
+	ExceptionCategoryInfoAccessDenied(String personName, String appName, String appId) {
+		super("person:{} access appInfo name: {} id: {}, denied.", personName, appName, appId);
+	}
+}

+ 0 - 1
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/data/BaseAction.java

@@ -18,7 +18,6 @@ import com.x.cms.assemble.control.service.CategoryInfoServiceAdv;
 import com.x.cms.assemble.control.service.DocumentInfoServiceAdv;
 import com.x.cms.assemble.control.service.UserManagerService;
 import com.x.cms.core.entity.Document;
-import com.x.cms.core.entity.tools.LogUtil;
 import com.x.query.core.entity.Item;
 
 import net.sf.ehcache.Ehcache;

+ 0 - 11
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionUpdateReviewForce.java

@@ -42,17 +42,6 @@ public class ActionUpdateReviewForce extends BaseAction {
 			}
 		}
 		
-		if( check ){
-			try {
-				permissionOperateService.refreshReview( id );
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ExceptionDocumentInfoProcess( e, "根据指定分类ID强制更新信息存根Review信息时发生异常。ID:" + id );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		
 		if( check ){
 			try {
 				WoId wo = new WoId();

+ 0 - 1
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/document/ActionView.java

@@ -33,7 +33,6 @@ public class ActionView extends BaseAction {
 	@SuppressWarnings("unchecked")
 	protected ActionResult<Wo> execute(HttpServletRequest request, String id, EffectivePerson effectivePerson) throws Exception {
 		ActionResult<Wo> result = new ActionResult<>();
-		Wo wo = new Wo();
 		Boolean isManager = false;
 		Boolean check = true;
 		Boolean isAnonymous = effectivePerson.isAnonymous();

+ 0 - 165
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/ActionTransferAllAppInfoPermission.java

@@ -1,165 +0,0 @@
-package com.x.cms.assemble.control.jaxrs.permission;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import com.x.base.core.project.cache.ApplicationCache;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoId;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.base.core.project.tools.ListTools;
-import com.x.cms.core.entity.AppCategoryAdmin;
-import com.x.cms.core.entity.AppCategoryPermission;
-import com.x.cms.core.entity.AppInfo;
-
-/**
- * 将所有的AppCategoryPermission对象转为新的AppInfo和CategoryInfo的对象
- * @author O2LEE
- *
- */
-public class ActionTransferAllAppInfoPermission extends BaseAction {
-
-	private static  Logger logger = LoggerFactory.getLogger( ActionTransferAllAppInfoPermission.class );
-	
-	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson ) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		List<String> allAppInfoIds = null;
-		Boolean check = true;
-
-		//查询所有的栏目信息ID列表
-		if( check ){
-			try {
-				allAppInfoIds = appInfoServiceAdv.listAllIds("全部");
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ExceptionAppCategoryAdminProcess( e, "系统查询所有的栏目ID列表时发生异常!" );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		
-		if( check ){
-			if( ListTools.isNotEmpty( allAppInfoIds )) {
-				List<String> appInfo_managerInfoIds = null;
-				List<AppCategoryAdmin> appInfo_appCategoryAdminList = null;
-				List<String> appInfo_permissionInfoIds = null;
-				List<AppCategoryPermission> appInfo_appCategoryPermissionList = null;
-				AppInfo appInfo = null;
-				
-				for( String appId : allAppInfoIds ) {
-					//查询栏目信息
-					try {
-						appInfo = appInfoServiceAdv.get( appId );
-						if( appInfo == null ){
-							continue;
-						}
-					} catch (Exception e) {
-						logger.error( e, effectivePerson, request, null);
-					}
-					
-					System.out.println(">>>>>正在处理栏目信息:" + appInfo.getAppAlias() );
-					
-					//查询栏目所有的管理员信息
-					try {
-						appInfo_managerInfoIds = appCategoryAdminServiceAdv.listAppCategoryIdByAppId(appId);
-						if( ListTools.isNotEmpty( appInfo_managerInfoIds )) {
-							appInfo_appCategoryAdminList = appCategoryAdminServiceAdv.list( appInfo_managerInfoIds );
-						}
-					} catch (Exception e) {
-						check = false;
-						Exception exception = new ExceptionAppCategoryAdminProcess( e, "根据栏目ID查询栏目所有的管理员信息时发生异常!" );
-						result.error( exception );
-						logger.error( e, effectivePerson, request, null);
-					}
-					
-					//查询栏目所有的发布和可见范围信息
-					try {
-						appInfo_permissionInfoIds = appCategoryPermissionServiceAdv.listPermissionByAppInfo(appId, null );
-						if( ListTools.isNotEmpty( appInfo_permissionInfoIds )) {
-							appInfo_appCategoryPermissionList = appCategoryPermissionServiceAdv.list( appInfo_permissionInfoIds );
-						}
-					} catch (Exception e) {
-						check = false;
-						Exception exception = new ExceptionAppCategoryAdminProcess( e, "根据栏目ID查询栏目所有的管理员信息时发生异常!" );
-						result.error( exception );
-						logger.error( e, effectivePerson, request, null);
-					}
-					
-					//组织好一个appInfo的权限信息,直接更新到数据库
-					List<String> viewablePersonList = new ArrayList<>();
-					List<String> viewableUnitList = new ArrayList<>();
-					List<String> viewableGroupList = new ArrayList<>();					
-					List<String> publishablePersonList = new ArrayList<>();					
-					List<String> publishableUnitList = new ArrayList<>();
-					List<String> publishableGroupList = new ArrayList<>();					
-					List<String> manageablePersonList = new ArrayList<>();
-					
-					if(ListTools.isNotEmpty( appInfo_appCategoryAdminList )) {
-						for( AppCategoryAdmin appCategoryAdmin : appInfo_appCategoryAdminList) {
-							manageablePersonList.add( appCategoryAdmin.getAdminUid());
-						}
-					}
-					
-					if(ListTools.isNotEmpty( appInfo_appCategoryPermissionList )) {
-						for( AppCategoryPermission appCategoryPermission  : appInfo_appCategoryPermissionList) {
-							if( "PUBLISH".equals( appCategoryPermission.getPermission() )) {
-								if( "USER".equals( appCategoryPermission.getUsedObjectType() )) {
-									publishablePersonList.add( appCategoryPermission.getUsedObjectCode() );
-								}else if( "UNIT".equals( appCategoryPermission.getUsedObjectType()  )) {
-									publishableUnitList.add( appCategoryPermission.getUsedObjectCode() );
-								}else if( "DEPARTMENT".equals( appCategoryPermission.getUsedObjectType()  )) {
-									publishableUnitList.add( appCategoryPermission.getUsedObjectCode() );
-								}else if( "GROUP".equals( appCategoryPermission.getUsedObjectType()  )) {
-									publishableGroupList.add( appCategoryPermission.getUsedObjectCode() );
-								}
-							}else if( "VIEW".equals( appCategoryPermission.getPermission() )) {
-								if( "USER".equals( appCategoryPermission.getUsedObjectType() )) {
-									viewablePersonList.add( appCategoryPermission.getUsedObjectCode() );
-								}else if( "UNIT".equals( appCategoryPermission.getUsedObjectType()  )) {
-									viewableUnitList.add( appCategoryPermission.getUsedObjectCode() );
-								}else if( "DEPARTMENT".equals( appCategoryPermission.getUsedObjectType()  )) {
-									viewableUnitList.add( appCategoryPermission.getUsedObjectCode() );
-								}else if( "GROUP".equals( appCategoryPermission.getUsedObjectType()  )) {
-									viewableGroupList.add( appCategoryPermission.getUsedObjectCode() );
-								}
-							}
-						}
-					}
-					
-					appInfo.setManageablePersonList(manageablePersonList);
-					appInfo.setPublishablePersonList(publishablePersonList);
-					appInfo.setPublishableUnitList(publishableUnitList);
-					appInfo.setPublishableGroupList(publishableGroupList);
-					appInfo.setViewablePersonList(viewablePersonList);
-					appInfo.setViewableUnitList(viewableUnitList);
-					appInfo.setViewableGroupList(viewableGroupList);				
-					
-					try {
-						appInfoServiceAdv.updateAllPermission( appInfo );
-					} catch (Exception e) {
-						check = false;
-						Exception exception = new ExceptionAppCategoryAdminProcess( e, "根据栏目ID查询栏目所有的管理员信息时发生异常!" );
-						result.error( exception );
-						logger.error( e, effectivePerson, request, null);
-					}
-					
-				}
-			}
-			ApplicationCache.notify( AppInfo.class );
-			
-			Wo wo = new Wo();
-			wo.setId( "" );
-			result.setData( wo );
-			System.out.println(">>>>>栏目信息权限数据结构全部处理完成。" );
-		}
-		return result;
-	}
-
-	public static class Wo extends WoId {
-
-	}
-}

+ 0 - 166
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/ActionTransferAllCategoryInfoPermission.java

@@ -1,166 +0,0 @@
-package com.x.cms.assemble.control.jaxrs.permission;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import com.x.base.core.project.cache.ApplicationCache;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoId;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.base.core.project.tools.ListTools;
-import com.x.cms.core.entity.AppCategoryAdmin;
-import com.x.cms.core.entity.AppCategoryPermission;
-import com.x.cms.core.entity.CategoryInfo;
-
-/**
- * 将所有的AppCategoryPermission对象转为新的CategoryInfo和CategoryInfo的对象
- * @author O2LEE
- *
- */
-public class ActionTransferAllCategoryInfoPermission extends BaseAction {
-
-	private static  Logger logger = LoggerFactory.getLogger( ActionTransferAllCategoryInfoPermission.class );
-	
-	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson ) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		List<String> allCategoryInfoIds = null;
-		Boolean check = true;
-
-		//查询所有的分类信息ID列表
-		if( check ){
-			try {
-				allCategoryInfoIds = categoryInfoServiceAdv.listAllIds();
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ExceptionAppCategoryAdminProcess( e, "系统查询所有的分类ID列表时发生异常!" );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		
-		if( check ){
-			if( ListTools.isNotEmpty( allCategoryInfoIds )) {
-				List<String> category_managerInfoIds = null;
-				List<AppCategoryAdmin> category_appCategoryAdminList = null;
-				List<String> category_permissionInfoIds = null;
-				List<AppCategoryPermission> category_appCategoryPermissionList = null;
-				CategoryInfo categoryInfo = null;
-				
-				for( String categoryId : allCategoryInfoIds ) {
-					//查询分类信息
-					try {
-						categoryInfo = categoryInfoServiceAdv.get( categoryId );
-						if( categoryInfo == null ){
-							continue;
-						}
-					} catch (Exception e) {
-						logger.error( e, effectivePerson, request, null);
-					}
-					
-					System.out.println(">>>>>正在处理分类信息:" + categoryInfo.getCategoryAlias() );
-					//查询分类所有的管理员信息
-					try {
-						category_managerInfoIds = appCategoryAdminServiceAdv.listAppCategoryIdByAppId(categoryId);
-						if( ListTools.isNotEmpty( category_managerInfoIds )) {
-							category_appCategoryAdminList = appCategoryAdminServiceAdv.list( category_managerInfoIds );
-						}
-					} catch (Exception e) {
-						check = false;
-						Exception exception = new ExceptionAppCategoryAdminProcess( e, "根据分类ID查询分类所有的管理员信息时发生异常!" );
-						result.error( exception );
-						logger.error( e, effectivePerson, request, null);
-					}
-					
-					//查询分类所有的发布和可见范围信息
-					try {
-						category_permissionInfoIds = appCategoryPermissionServiceAdv.listPermissionByCategory(categoryId, null);
-						if( ListTools.isNotEmpty( category_permissionInfoIds )) {
-							category_appCategoryPermissionList = appCategoryPermissionServiceAdv.list( category_permissionInfoIds );
-						}
-					} catch (Exception e) {
-						check = false;
-						Exception exception = new ExceptionAppCategoryAdminProcess( e, "根据分类ID查询分类所有的管理员信息时发生异常!" );
-						result.error( exception );
-						logger.error( e, effectivePerson, request, null);
-					}
-					
-					//组织好一个categoryInfo的权限信息,直接更新到数据库
-					List<String> viewablePersonList = new ArrayList<>();
-					List<String> viewableUnitList = new ArrayList<>();
-					List<String> viewableGroupList = new ArrayList<>();					
-					List<String> publishablePersonList = new ArrayList<>();					
-					List<String> publishableUnitList = new ArrayList<>();
-					List<String> publishableGroupList = new ArrayList<>();					
-					List<String> manageablePersonList = new ArrayList<>();
-					
-					if(ListTools.isNotEmpty( category_appCategoryAdminList )) {
-						for( AppCategoryAdmin appCategoryAdmin : category_appCategoryAdminList) {
-							manageablePersonList.add( appCategoryAdmin.getAdminUid());
-						}
-					}
-					
-					if(ListTools.isNotEmpty( category_appCategoryPermissionList )) {
-						for( AppCategoryPermission appCategoryPermission  : category_appCategoryPermissionList) {
-							if( "PUBLISH".equals( appCategoryPermission.getPermission() )) {
-								if( "USER".equals( appCategoryPermission.getUsedObjectType() )) {
-									publishablePersonList.add( appCategoryPermission.getUsedObjectCode() );
-								}else if( "UNIT".equals( appCategoryPermission.getUsedObjectType()  )) {
-									publishableUnitList.add( appCategoryPermission.getUsedObjectCode() );
-								}else if( "DEPARTMENT".equals( appCategoryPermission.getUsedObjectType()  )) {
-									publishableUnitList.add( appCategoryPermission.getUsedObjectCode() );
-								}else if( "GROUP".equals( appCategoryPermission.getUsedObjectType()  )) {
-									publishableGroupList.add( appCategoryPermission.getUsedObjectCode() );
-								}
-							}else if( "VIEW".equals( appCategoryPermission.getPermission() )) {
-								if( "USER".equals( appCategoryPermission.getUsedObjectType() )) {
-									viewablePersonList.add( appCategoryPermission.getUsedObjectCode() );
-								}else if( "UNIT".equals( appCategoryPermission.getUsedObjectType()  )) {
-									viewableUnitList.add( appCategoryPermission.getUsedObjectCode() );
-								}else if( "DEPARTMENT".equals( appCategoryPermission.getUsedObjectType()  )) {
-									viewableUnitList.add( appCategoryPermission.getUsedObjectCode() );
-								}else if( "GROUP".equals( appCategoryPermission.getUsedObjectType()  )) {
-									viewableGroupList.add( appCategoryPermission.getUsedObjectCode() );
-								}
-							}
-						}
-					}
-					
-					categoryInfo.setManageableGroupList( new ArrayList<>() );
-					categoryInfo.setManageableUnitList(  new ArrayList<>() );
-					categoryInfo.setManageablePersonList(manageablePersonList);
-					categoryInfo.setPublishablePersonList(publishablePersonList);
-					categoryInfo.setPublishableUnitList(publishableUnitList);
-					categoryInfo.setPublishableGroupList(publishableGroupList);
-					categoryInfo.setViewablePersonList(viewablePersonList);
-					categoryInfo.setViewableUnitList(viewableUnitList);
-					categoryInfo.setViewableGroupList(viewableGroupList);
-					
-					try {
-						categoryInfoServiceAdv.updateAllPermission( categoryInfo );
-					} catch (Exception e) {
-						check = false;
-						Exception exception = new ExceptionAppCategoryAdminProcess( e, "根据分类ID查询分类所有的管理员信息时发生异常!" );
-						result.error( exception );
-						logger.error( e, effectivePerson, request, null);
-					}
-					
-				}
-			}
-			ApplicationCache.notify( CategoryInfo.class );
-			
-			Wo wo = new Wo();
-			wo.setId( "" );
-			result.setData( wo );
-			System.out.println(">>>>>分类信息权限数据结构全部处理完成。" );
-		}
-		return result;
-	}
-
-	public static class Wo extends WoId {
-
-	}
-}

+ 0 - 185
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/ActionTransferAllDocumentInfoPermission.java

@@ -1,185 +0,0 @@
-package com.x.cms.assemble.control.jaxrs.permission;
-
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import com.x.base.core.project.cache.ApplicationCache;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoId;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.base.core.project.tools.ListTools;
-import com.x.cms.core.entity.CategoryInfo;
-import com.x.cms.core.entity.Document;
-import com.x.cms.core.entity.DocumentPermission;
-
-/**
- * 将所有的AppCategoryPermission对象转为新的CategoryInfo和CategoryInfo的对象
- * @author O2LEE
- *
- */
-public class ActionTransferAllDocumentInfoPermission extends BaseAction {
-
-	private static  Logger logger = LoggerFactory.getLogger( ActionTransferAllDocumentInfoPermission.class );
-	
-	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson ) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		List<String> allCategoryInfoIds = null;
-		Boolean check = true;
-
-		//查询所有的分类信息ID列表
-		if( check ){
-			try {
-				allCategoryInfoIds = categoryInfoServiceAdv.listAllIds();
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ExceptionAppCategoryAdminProcess( e, "系统查询所有的分类ID列表时发生异常!" );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		
-		if( check ){
-			if( ListTools.isNotEmpty( allCategoryInfoIds )) {
-				List<String> documentIds = null;
-				List<String> docPermissionIds = null;
-				List<DocumentPermission> documentPermissions = null;
-				CategoryInfo categoryInfo = null;
-				Document document = null;
-				for( String categoryId : allCategoryInfoIds ) {
-					//查询分类信息
-					try {
-						categoryInfo = categoryInfoServiceAdv.get( categoryId );
-						if( categoryInfo == null ){
-							continue;
-						}
-					} catch (Exception e) {
-						logger.error( e, effectivePerson, request, null);
-					}
-					
-					System.out.println(">>>>>正在处理分类信息:" + categoryInfo.getCategoryAlias() );
-					
-					//查询该分类下所有的文档ID列表
-					try {
-						documentIds = documentServiceAdv.listIdsByCategoryId(categoryId);
-						if( ListTools.isEmpty( documentIds ) ){
-							continue;
-						}
-					} catch (Exception e) {
-						logger.error( e, effectivePerson, request, null);
-					}
-					
-					//遍历所有的文档,更新权限数据结构
-					for( String docId : documentIds ) {
-						try {
-							document = documentServiceAdv.get(docId);
-							if( document == null ){
-								continue;
-							}
-						} catch (Exception e) {
-							logger.error( e, effectivePerson, request, null);
-						}
-						System.out.println(">>>>>正在处理文档信息:" + document.getTitle() );
-						try {
-							docPermissionIds = documentPermissionServiceAdv.listPermissionIdsWithDocId(docId );
-							if( ListTools.isNotEmpty( docPermissionIds ) ){
-								documentPermissions = documentPermissionServiceAdv.list( docPermissionIds );
-							}
-						} catch (Exception e) {
-							logger.error( e, effectivePerson, request, null);
-						}
-						
-						document.setAuthorPersonList( null );
-						document.setAuthorUnitList( null );
-						document.setAuthorGroupList( null );
-						document.setReadPersonList( null );
-						document.setReadUnitList( null );
-						document.setReadGroupList( null );
-						document.setManagerList( null );
-						
-						if( ListTools.isNotEmpty( documentPermissions )) {
-							//组织权限数据结构
-							for( DocumentPermission documentPermission : documentPermissions ) {
-								if( "管理".equals( documentPermission.getPermission() )) {
-									document.addManagerList(documentPermission.getPermissionObjectCode());
-								}else if( "读者".equals( documentPermission.getPermission() )) {
-									if( "人员".equals( documentPermission.getPermissionObjectType() )) {
-										document.addReadPersonList(documentPermission.getPermissionObjectCode());
-									}else if( "部门".equals(  documentPermission.getPermissionObjectType() )) {
-										document.addReadUnitList(documentPermission.getPermissionObjectCode());
-									}else if( "群组".equals( documentPermission.getPermissionObjectType() )) {
-										document.addReadGroupList(documentPermission.getPermissionObjectCode());
-									}else if( "所有人".equals( documentPermission.getPermissionObjectCode() )) {
-										document.addReadPersonList("所有人");
-									}
-								}else if( "阅读".equals( documentPermission.getPermission() )) {
-									if( "人员".equals( documentPermission.getPermissionObjectType() )) {
-										document.addReadPersonList(documentPermission.getPermissionObjectCode());
-									}else if( "部门".equals(  documentPermission.getPermissionObjectType() )) {
-										document.addReadUnitList(documentPermission.getPermissionObjectCode());
-									}else if( "群组".equals( documentPermission.getPermissionObjectType() )) {
-										document.addReadGroupList(documentPermission.getPermissionObjectCode());
-									}else if( "所有人".equals( documentPermission.getPermissionObjectCode() )) {
-										document.addReadPersonList("所有人");
-									}
-								}else if( "作者".equals( documentPermission.getPermission() )) {
-									if( "人员".equals( documentPermission.getPermissionObjectType() )) {
-										document.addAuthorPersonList(documentPermission.getPermissionObjectCode());
-									}else if( "部门".equals(  documentPermission.getPermissionObjectType() )) {
-										document.addAuthorUnitList(documentPermission.getPermissionObjectCode());
-									}else if( "群组".equals( documentPermission.getPermissionObjectType() )) {
-										document.addAuthorGroupList(documentPermission.getPermissionObjectCode());
-									}else if( "所有人".equals( documentPermission.getPermissionObjectCode() )) {
-										document.addAuthorPersonList("所有人");
-									}
-								}
-							}
-						}
-						
-						if( ListTools.isEmpty( document.getReadPersonList() ) && ListTools.isEmpty( document.getReadUnitList() ) 
-								&& ListTools.isEmpty( document.getReadGroupList() )) {
-							//全部都为空,则是创建人可访问
-							document.addReadPersonList( "所有人" );
-							document.addReadPersonList( document.getCreatorPerson() );
-						}
-						
-						if( ListTools.isEmpty( document.getAuthorPersonList() ) && ListTools.isEmpty( document.getAuthorUnitList() ) 
-								&& ListTools.isEmpty( document.getAuthorGroupList() )) {
-							//全部都为空,则是创建人可访问
-							document.addAuthorPersonList( "所有人" );
-							document.addAuthorPersonList( document.getCreatorPerson() );
-						}
-						
-						if( ListTools.isEmpty( document.getManagerList() ) ) {
-							//全部都为空,则是创建人可以管理
-							document.addManagerList( document.getCreatorPerson() );
-						}
-						
-						try {
-							documentServiceAdv.updateAllPermission( document );
-						} catch (Exception e) {
-							check = false;
-							Exception exception = new ExceptionDocumentPermissionTransfer( e, docId );
-							result.error( exception );
-							logger.error( e, effectivePerson, request, null);
-						}
-					}
-				}
-			}
-			
-			ApplicationCache.notify( Document.class );
-			
-			Wo wo = new Wo();
-			wo.setId( "" );
-			result.setData( wo );
-			System.out.println(">>>>>文档信息权限数据结构全部处理完成。" );
-		}
-		return result;
-	}
-
-	public static class Wo extends WoId {
-
-	}
-}

+ 0 - 8
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/BaseAction.java

@@ -4,9 +4,6 @@ import com.x.base.core.project.jaxrs.StandardJaxrsAction;
 import com.x.cms.assemble.control.service.AppInfoServiceAdv;
 import com.x.cms.assemble.control.service.CategoryInfoServiceAdv;
 import com.x.cms.assemble.control.service.DocumentInfoServiceAdv;
-import com.x.cms.assemble.control.service.RescissoryClass_AppCategoryAdminServiceAdv;
-import com.x.cms.assemble.control.service.RescissoryClass_AppCategoryPermissionServiceAdv;
-import com.x.cms.assemble.control.service.RescissoryClass_DocumentPermissionServiceAdv;
 import com.x.cms.assemble.control.service.UserManagerService;
 
 public class BaseAction extends StandardJaxrsAction {
@@ -14,11 +11,6 @@ public class BaseAction extends StandardJaxrsAction {
 	protected UserManagerService userManagerService = new UserManagerService();
 	protected AppInfoServiceAdv appInfoServiceAdv = new AppInfoServiceAdv();
 	protected CategoryInfoServiceAdv categoryInfoServiceAdv = new CategoryInfoServiceAdv();
-	
-	//暂用于数据转换
-	protected RescissoryClass_AppCategoryAdminServiceAdv appCategoryAdminServiceAdv = new RescissoryClass_AppCategoryAdminServiceAdv();
-	protected RescissoryClass_AppCategoryPermissionServiceAdv appCategoryPermissionServiceAdv = new RescissoryClass_AppCategoryPermissionServiceAdv();
-	protected RescissoryClass_DocumentPermissionServiceAdv documentPermissionServiceAdv = new RescissoryClass_DocumentPermissionServiceAdv();
 	protected DocumentInfoServiceAdv documentServiceAdv = new DocumentInfoServiceAdv();
 
 }

+ 1 - 59
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/jaxrs/permission/PermissionAction.java

@@ -349,63 +349,5 @@ public class PermissionAction extends StandardJaxrsAction {
 			}
 		}
 		return ResponseFactory.getDefaultActionResultResponse(result);
-	}
-	
-	@JaxrsMethodDescribe(value = "转换所有栏目信息的权限数据结构.", action = ActionTransferAllAppInfoPermission.class)
-	@GET
-	@Path("appinfo/transfer/all")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public Response transferAllAppInfoPermission(@Context HttpServletRequest request ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
-		ActionResult<ActionTransferAllAppInfoPermission.Wo> result = null;
-		try {
-			result = new ActionTransferAllAppInfoPermission().execute( request, effectivePerson );
-		} catch (Exception e) {
-			result = new ActionResult<>();
-			Exception exception = new ExceptionAppCategoryAdminProcess( e, "系统转换所有栏目信息的权限数据结构时发生异常。" );
-			result.error( exception );
-			logger.error( e, effectivePerson, request, null);
-		}
-		return ResponseFactory.getDefaultActionResultResponse(result);
-	}
-	
-	@JaxrsMethodDescribe(value = "转换所有分类信息的权限数据结构.", action = ActionTransferAllCategoryInfoPermission.class)
-	@GET
-	@Path("category/transfer/all")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public Response transferAllCategoryInfoPermission(@Context HttpServletRequest request ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
-		ActionResult<ActionTransferAllCategoryInfoPermission.Wo> result = null;
-		try {
-			result = new ActionTransferAllCategoryInfoPermission().execute( request, effectivePerson );
-		} catch (Exception e) {
-			result = new ActionResult<>();
-			Exception exception = new ExceptionAppCategoryAdminProcess( e, "系统转换所有分类信息的权限数据结构时发生异常。" );
-			result.error( exception );
-			logger.error( e, effectivePerson, request, null);
-		}
-		return ResponseFactory.getDefaultActionResultResponse(result);
-	}
-	
-	@JaxrsMethodDescribe(value = "转换所有文档的权限数据格式.", action = ActionTransferAllDocumentInfoPermission.class)
-	@GET
-	@Path("document/transfer/all")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public Response transferAllDocumentPermission(@Context HttpServletRequest request ) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
-		ActionResult<ActionTransferAllDocumentInfoPermission.Wo> result = null;
-		try {
-			result = new ActionTransferAllDocumentInfoPermission().execute( request, effectivePerson );
-		} catch (Exception e) {
-			result = new ActionResult<>();
-			Exception exception = new ExceptionAppCategoryAdminProcess( e, "系统转换所有文档的权限数据格式时发生异常。" );
-			result.error( exception );
-			logger.error( e, effectivePerson, request, null);
-		}
-		return ResponseFactory.getDefaultActionResultResponse(result);
-	}
-	
+	}	
 }

+ 1 - 13
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/AppInfoService.java

@@ -23,27 +23,15 @@ import com.x.query.core.entity.Item;
 
 public class AppInfoService {
 
-//	public List<AppInfo> list( EntityManagerContainer emc, List<String> ids ) throws Exception {
-//		if( ids == null || ids.isEmpty() ){
-//			return null;
-//		}
-//		return emc.list( AppInfo.class,  ids );
-//		Business business = new Business( emc );
-//		return business.getAppInfoFactory().list( ids );
-//	}
 	public List<String> listAllIds(EntityManagerContainer emc, String documentType ) throws Exception {
 		Business business = new Business( emc );
 		return business.getAppInfoFactory().listAllIds(documentType);
 	}
+	
 	public List<AppInfo> listAll(EntityManagerContainer emc, String documentType) throws Exception {
 		Business business = new Business( emc );
 		return business.getAppInfoFactory().listAll(documentType);
 	}
-
-	public List<AppInfo> listInReviewAppInfoList(EntityManagerContainer emc) throws Exception {
-		Business business = new Business( emc );
-		return business.getAppInfoFactory().listInReviewAppInfoList();
-	}
 	
 	@SuppressWarnings("unchecked")
 	public void delete( EntityManagerContainer emc, String id, String documentType, Integer maxCount ) throws Exception {

+ 0 - 14
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/AppInfoServiceAdv.java

@@ -110,7 +110,6 @@ public class AppInfoServiceAdv {
 				}else {
 					appInfo.addManageablePerson( currentPerson.getDistinguishedName() );
 				}
-				appInfo.setReviewed( false );
 				emc.check( appInfo, CheckPersistType.all );
 				emc.commit();
 			}
@@ -152,14 +151,6 @@ public class AppInfoServiceAdv {
 			throw e;
 		}
 	}
-
-	public List<AppInfo> listInReviewAppInfoList() throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return appInfoService.listInReviewAppInfoList( emc );
-		} catch (Exception e) {
-			throw e;
-		}
-	}
 	
 	public void saveAppInfoIcon( String appId, String base64, String iconMainColor ) throws Exception {
 		if (appId == null || appId.isEmpty()) {
@@ -205,7 +196,6 @@ public class AppInfoServiceAdv {
 			appInfo.setManageablePersonList(personList);
 			appInfo.setManageableUnitList(unitList);
 			appInfo.setManageableGroupList(groupList);
-			appInfo.setReviewed( false );
 			emc.check(appInfo , CheckPersistType.all );
 			emc.commit();
 		} catch (Exception e) {
@@ -231,7 +221,6 @@ public class AppInfoServiceAdv {
 			appInfo.setPublishablePersonList(personList);
 			appInfo.setPublishableUnitList(unitList);
 			appInfo.setPublishableGroupList(groupList);
-			appInfo.setReviewed( false );
 			emc.check(appInfo , CheckPersistType.all );
 			emc.commit();
 		} catch (Exception e) {
@@ -257,7 +246,6 @@ public class AppInfoServiceAdv {
 			appInfo.setViewablePersonList(personList);
 			appInfo.setViewableUnitList(unitList);
 			appInfo.setViewableGroupList(groupList);
-			appInfo.setReviewed( false );
 			emc.check(appInfo , CheckPersistType.all );
 			emc.commit();
 		} catch (Exception e) {
@@ -283,7 +271,6 @@ public class AppInfoServiceAdv {
 				if( StringUtils.isEmpty( appInfo_entity.getDocumentType() )) {
 					appInfo_entity.setDocumentType( "信息" );
 				}
-				appInfo.setReviewed( false );
 				emc.check(appInfo_entity , CheckPersistType.all );
 				emc.commit();
 			}
@@ -395,7 +382,6 @@ public class AppInfoServiceAdv {
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 			AppInfo appInfo = emc.find( appId, AppInfo.class );
 			emc.beginTransaction( AppInfo.class );
-			appInfo.setReviewed( true );
 			emc.persist( appInfo, CheckPersistType.all );
 			emc.commit();
 		} catch (Exception e) {

+ 0 - 13
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/CategoryInfoService.java

@@ -24,14 +24,6 @@ import com.x.query.core.entity.Item;
 
 public class CategoryInfoService {
 
-//	public List<CategoryInfo> list(EntityManagerContainer emc, List<String> ids) throws Exception {
-//		if( ids == null || ids.isEmpty() ){
-//			return null;
-//		}
-//		Business business = new Business( emc );
-//		return business.getCategoryInfoFactory().list( ids );
-//	}
-	
 	public CategoryInfo get( EntityManagerContainer emc, String id ) throws Exception {
 		if( id == null || id.isEmpty() ){
 			return null;
@@ -453,9 +445,4 @@ public class CategoryInfoService {
 		return business.getCategoryInfoFactory().listManageableCategoryIds( personName, unitNames, groupNames, inAppInfoIds,
 				documentType, maxCount );
 	}
-
-	public List<CategoryInfo> listInReviewCategoryInfoList(EntityManagerContainer emc) throws Exception {
-		Business business = new Business( emc );
-		return business.getCategoryInfoFactory().listInReviewCategoryInfoList();
-	}
 }

+ 0 - 16
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/CategoryInfoServiceAdv.java

@@ -112,15 +112,6 @@ public class CategoryInfoServiceAdv {
 		}
 	}
 	
-
-	public List<CategoryInfo> listInReviewCategoryInfoList() throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return categoryInfoService.listInReviewCategoryInfoList(emc);
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-	
 	public void inReview(String categoryId) throws Exception {
 		if (StringUtils.isEmpty( categoryId )) {
 			throw new Exception("categoryId is empty.");
@@ -129,7 +120,6 @@ public class CategoryInfoServiceAdv {
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 			categoryInfo = emc.find( categoryId, CategoryInfo.class );
 			emc.beginTransaction( CategoryInfo.class );
-			categoryInfo.setReviewed( false );
 			emc.persist( categoryInfo, CheckPersistType.all );
 			emc.commit();
 		} catch (Exception e) {
@@ -162,7 +152,6 @@ public class CategoryInfoServiceAdv {
 				//如果不存在,则将当前登录者作为应用栏目的管理者
 				emc.beginTransaction( CategoryInfo.class );
 				categoryInfo.addManageablePerson( currentPerson.getDistinguishedName() );
-				categoryInfo.setReviewed( false );
 				emc.check( categoryInfo, CheckPersistType.all );
 				emc.commit();
 			}
@@ -246,7 +235,6 @@ public class CategoryInfoServiceAdv {
 			categoryInfo.setManageablePersonList(personList);
 			categoryInfo.setManageableUnitList(unitList);
 			categoryInfo.setManageableGroupList(groupList);
-			categoryInfo.setReviewed( false );
 			emc.check(categoryInfo , CheckPersistType.all );
 			emc.commit();
 		} catch (Exception e) {
@@ -272,7 +260,6 @@ public class CategoryInfoServiceAdv {
 			categoryInfo.setPublishablePersonList(personList);
 			categoryInfo.setPublishableUnitList(unitList);
 			categoryInfo.setPublishableGroupList(groupList);
-			categoryInfo.setReviewed( false );
 			emc.check(categoryInfo , CheckPersistType.all );
 			emc.commit();
 		} catch (Exception e) {
@@ -298,7 +285,6 @@ public class CategoryInfoServiceAdv {
 			categoryInfo.setViewablePersonList(personList);
 			categoryInfo.setViewableUnitList(unitList);
 			categoryInfo.setViewableGroupList(groupList);
-			categoryInfo.setReviewed( false );
 			emc.check(categoryInfo , CheckPersistType.all );
 			emc.commit();
 		} catch (Exception e) {
@@ -326,7 +312,6 @@ public class CategoryInfoServiceAdv {
 				if( StringUtils.isEmpty( categoryInfo_entity.getDocumentType() )) {
 					categoryInfo_entity.setDocumentType( "信息" );
 				}
-				categoryInfo.setReviewed( false );
 				emc.check(categoryInfo_entity , CheckPersistType.all );
 				emc.commit();
 			}
@@ -471,7 +456,6 @@ public class CategoryInfoServiceAdv {
 		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
 			CategoryInfo categoryInfo = emc.find( categoryId, CategoryInfo.class );
 			emc.beginTransaction( CategoryInfo.class );
-			categoryInfo.setReviewed( true );
 			emc.persist( categoryInfo, CheckPersistType.all );
 			emc.commit();
 		} catch (Exception e) {

+ 0 - 352
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/PermissionOperateService.java

@@ -9,17 +9,13 @@ import org.apache.openjpa.lib.util.StringUtil;
 import com.x.base.core.container.EntityManagerContainer;
 import com.x.base.core.container.factory.EntityManagerContainerFactory;
 import com.x.base.core.entity.annotation.CheckPersistType;
-import com.x.base.core.entity.annotation.CheckRemoveType;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
 import com.x.base.core.project.tools.ListTools;
 import com.x.cms.assemble.control.Business;
 import com.x.cms.assemble.control.jaxrs.permission.element.PermissionInfo;
 import com.x.cms.assemble.control.jaxrs.permission.element.PermissionName;
-import com.x.cms.core.entity.AppInfo;
-import com.x.cms.core.entity.CategoryInfo;
 import com.x.cms.core.entity.Document;
-import com.x.cms.core.entity.Review;
 
 public class PermissionOperateService {
 	
@@ -181,352 +177,4 @@ public class PermissionOperateService {
 			throw e;
 		}
 	}
-	
-	/**
-	 * 根据栏目ID,更新栏目内所有文档的Review信息
-	 * @param appId
-	 * @throws Exception
-	 */
-	@SuppressWarnings("unchecked")
-	public void refreshReviewWithAppId( String appId ) throws Exception {
-		if( StringUtils.isEmpty(appId) ){
-			throw new Exception( "appId is empty!" );
-		}
-		AppInfo appInfo = null;
-		Business business = null;
-		List<String> categoryIds = null;
-		List<String> documentIds = null;
-		List<CategoryInfo> categoryList = null;
-		List<Document> documentList = null;
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
-			business = new Business(emc);
-			appInfo = emc.find( appId, AppInfo.class );
-			
-			if( appInfo == null || !"信息".equals( appInfo.getDocumentType() ) ) {
-				if( appInfo != null) {
-					emc.beginTransaction( AppInfo.class );
-					appInfo.setReviewed( true  );
-					emc.check( appInfo, CheckPersistType.all );
-					emc.commit();
-				}
-				return;
-			}
-			//查询栏目下所有的分类信息
-			categoryIds = business.getCategoryInfoFactory().listByAppId( appId );
-			if( ListTools.isNotEmpty( categoryIds )) {
-				categoryList = emc.list( CategoryInfo.class , categoryIds );
-//				categoryList = business.getCategoryInfoFactory().list( categoryIds );
-				for( CategoryInfo categoryInfo :  categoryList ) {
-					if( !"信息".equals( categoryInfo.getDocumentType() ) ) {
-						emc.beginTransaction( CategoryInfo.class );
-						categoryInfo.setReviewed( true  );
-						emc.check( categoryInfo, CheckPersistType.all );
-						emc.commit();
-						continue;
-					}
-					documentIds = business.getDocumentFactory().listByCategoryId( categoryInfo.getId() );
-					if( ListTools.isNotEmpty( documentIds )) {
-						documentList = emc.list( Document.class,  documentIds );
-//						documentList = business.getDocumentFactory().list( documentIds );
-						for( Document document :  documentList ) {
-							if( !document.getDocStatus().equalsIgnoreCase("published") || !"信息".equals( document.getDocumentType() ) ) {
-								emc.beginTransaction( Document.class );
-								document.setReviewed( true  );
-								emc.check( document, CheckPersistType.all );
-								emc.commit();
-								continue;
-							}
-							//更新每个文档相应的Review信息
-							try {
-								refreshReview( emc, appInfo, categoryInfo, document );
-							}catch( Exception e ) {
-								e.printStackTrace();
-							}
-						}
-					}
-					emc.beginTransaction( CategoryInfo.class );
-					categoryInfo.setReviewed( true  );
-					emc.check( categoryInfo, CheckPersistType.all );
-					emc.commit();
-				}
-			}
-			emc.beginTransaction( AppInfo.class );
-			appInfo.setReviewed( true  );
-			emc.check( appInfo, CheckPersistType.all );
-			emc.commit();
-		}
-	}	
-	
-	/**
-	 * 根据分类ID,更新栏目内所有文档的Review信息
-	 * @param categoryId
-	 * @throws Exception
-	 */
-	@SuppressWarnings("unchecked")
-	public void refreshReviewWithCategoryId( String categoryId ) throws Exception {
-		if( StringUtils.isEmpty( categoryId ) ){
-			throw new Exception( "categoryId is empty!" );
-		}
-		AppInfo appInfo = null;
-		CategoryInfo categoryInfo = null;
-		Business business = null;
-		List<String> documentIds = null;
-		List<Document> documentList = null;
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
-			business = new Business(emc);
-			categoryInfo = emc.find( categoryId, CategoryInfo.class );
-			
-			if( categoryInfo == null || !"信息".equals( categoryInfo.getDocumentType() ) ) {
-				if( categoryInfo != null ) {
-					emc.beginTransaction( CategoryInfo.class );
-					categoryInfo.setReviewed( true  );
-					emc.check( categoryInfo, CheckPersistType.all );
-					emc.commit();
-				}
-				return;
-			}
-			appInfo = emc.find( categoryInfo.getAppId(), AppInfo.class );
-			documentIds = business.getDocumentFactory().listByCategoryId( categoryInfo.getId() );
-			if( ListTools.isNotEmpty( documentIds )) {
-				documentList = emc.list( Document.class,  documentIds );
-//				documentList = business.getDocumentFactory().list( documentIds );
-				for( Document document :  documentList ) {
-					if( !document.getDocStatus().equalsIgnoreCase("published") || !"信息".equals( document.getDocumentType() ) ) {
-						emc.beginTransaction( Document.class );
-						document.setReviewed( true  );
-						emc.check( document, CheckPersistType.all );
-						emc.commit();
-						continue;
-					}
-					//更新每个文档相应的Review信息
-					try {
-						refreshReview( emc, appInfo, categoryInfo, document );
-					}catch( Exception e ) {
-						e.printStackTrace();
-					}
-				}
-			}
-			
-			emc.beginTransaction( CategoryInfo.class );
-			categoryInfo.setReviewed( true  );
-			emc.check( categoryInfo, CheckPersistType.all );
-			emc.commit();
-			
-		}
-	}	
-	
-	/**
-	 * 根据文档ID,重新刷新Review数据
-	 * @param docId
-	 * @throws Exception 
-	 */
-	public void refreshReview( String docId ) throws Exception {
-		
-		if( StringUtils.isEmpty(docId) ){
-			throw new Exception( "docId is empty!" );
-		}
-		AppInfo appInfo = null;
-		CategoryInfo categoryInfo = null;
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
-			Document document = emc.find( docId, Document.class );
-			if( document == null || !document.getDocStatus().equalsIgnoreCase("published") || !"信息".equals( document.getDocumentType() ) ) {
-				if( document != null ) {
-					emc.beginTransaction( Document.class );
-					document.setReviewed( true  );
-					emc.check( document, CheckPersistType.all );
-					emc.commit();
-				}
-				return;
-			}
-			appInfo = emc.find( document.getAppId(), AppInfo.class );
-			categoryInfo = emc.find( document.getCategoryId(), CategoryInfo.class );
-			try {
-				refreshReview( emc, appInfo, categoryInfo, document );
-			}catch( Exception e ) {
-				e.printStackTrace();
-			}
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-	
-	private Boolean refreshReview( EntityManagerContainer emc, AppInfo appInfo, CategoryInfo categoryInfo, Document document ) throws Exception {
-		if( appInfo == null ) {
-			throw new Exception( "appInfo is null!" );
-		}
-		if( categoryInfo == null ) {
-			throw new Exception( "categoryInfo is null!" );
-		}
-		if( document == null ) {
-			throw new Exception( "document is null!" );
-		}
-		
-		List<String> personNames_appInfo = new ArrayList<>();
-		List<String> personNames_categoryInfo = new ArrayList<>();
-		List<String> personNames_document = new ArrayList<>();
-		List<String> unitNames_appInfo = new ArrayList<>();
-		List<String> unitNames_categoryInfo = new ArrayList<>();
-		List<String> unitNames_document = new ArrayList<>();
-		List<String> groupNames_appInfo = new ArrayList<>();
-		List<String> groupNames_categoryInfo = new ArrayList<>();
-		List<String> groupNames_document = new ArrayList<>();
-		
-		//获取所有的栏目权限
-		personNames_appInfo = appInfo.getViewablePersonList();
-		unitNames_appInfo = appInfo.getViewableUnitList();
-		groupNames_appInfo = appInfo.getViewableGroupList();
-		personNames_appInfo = mergeList( personNames_appInfo, appInfo.getPublishablePersonList() );
-		personNames_appInfo = mergeList( personNames_appInfo, appInfo.getManageablePersonList() );
-		unitNames_appInfo = mergeList( unitNames_appInfo, appInfo.getPublishableUnitList() );
-		unitNames_appInfo = mergeList( unitNames_appInfo, appInfo.getManageableUnitList() );
-		groupNames_appInfo = mergeList( groupNames_appInfo, appInfo.getPublishableGroupList() );
-		groupNames_appInfo = mergeList( groupNames_appInfo, appInfo.getManageableGroupList() );
-		
-		//获取所有的分类权限
-		personNames_categoryInfo = categoryInfo.getViewablePersonList();
-		unitNames_categoryInfo = categoryInfo.getViewableUnitList();
-		groupNames_categoryInfo = categoryInfo.getViewableGroupList();
-		personNames_categoryInfo = mergeList( personNames_categoryInfo, categoryInfo.getPublishablePersonList() );
-		personNames_categoryInfo = mergeList( personNames_categoryInfo, categoryInfo.getManageablePersonList() );
-		unitNames_categoryInfo = mergeList( unitNames_categoryInfo, categoryInfo.getPublishableUnitList() );
-		unitNames_categoryInfo = mergeList( unitNames_categoryInfo, categoryInfo.getManageableUnitList() );
-		groupNames_categoryInfo = mergeList( groupNames_categoryInfo, categoryInfo.getPublishableGroupList() );
-		groupNames_categoryInfo = mergeList( groupNames_categoryInfo, categoryInfo.getManageableGroupList() );
-		
-		//获取所有的文档权限
-		personNames_document = document.getReadPersonList();
-		unitNames_document = document.getReadUnitList();
-		groupNames_document = document.getReadGroupList();
-		personNames_document = mergeList( personNames_categoryInfo, document.getAuthorPersonList() );
-		unitNames_document = mergeList( unitNames_categoryInfo, document.getAuthorUnitList() );
-		groupNames_document = mergeList( groupNames_categoryInfo, document.getAuthorGroupList() );	
-		
-		if( appInfo.getAllPeopleView() ) {
-			//栏目权限为全员可见,尝试继承分类权限
-			if( categoryInfo.getAllPeopleView() ) {
-				//分类权限为全员可见,尝试继承文档权限
-				if( document.getReadPersonList( ).contains("所有人") ) {
-					//文档也是全员可见,为文档添加一个权限可见的Review
-					updateReview( emc, document, true );
-				}else {
-					//直接继承文档的权限配置
-					updateReview( emc, document, personNames_document, unitNames_document, groupNames_document, false );
-				}
-			}else {
-				//如果文档权限不为空,则以文档权限为准,如果文档权限为空,以分类权限为准
-				if( document.getReadPersonList( ).contains("所有人") ) {
-					//文档是全员可见,以分类权限为准
-					updateReview( emc, document, personNames_categoryInfo, unitNames_categoryInfo, groupNames_categoryInfo, false );
-				}else {
-					//直接继承文档的权限配置
-					updateReview( emc, document, personNames_document, unitNames_document, groupNames_document, false );
-				}
-			}
-		}else {
-			//栏目权限不为空,尝试判断分类是否全员可见
-			if( categoryInfo.getAllPeopleView() ) {
-				//分类全员可见,判断文档是否全员可见
-				if( document.getReadPersonList( ).contains("所有人") ) {
-					//文档为全员可见,直接继承栏目权限
-					updateReview( emc, document, personNames_appInfo, unitNames_appInfo, groupNames_appInfo, false );
-				}else {
-					//文档有权限控制,直接继承文档的权限配置
-					updateReview( emc, document, personNames_document, unitNames_document, groupNames_document, false );
-				}
-			}else {
-				//分类不为全员可见,判断文档是否全员可见
-				if( document.getReadPersonList( ).contains("所有人") ) {
-					//文档为全员可见,直接继承分类权限
-					updateReview( emc, document, personNames_categoryInfo, unitNames_categoryInfo, groupNames_categoryInfo, false );
-				}else {
-					//文档有权限控制,直接继承文档的权限配置
-					updateReview( emc, document, personNames_document, unitNames_document, groupNames_document, false );
-				}
-			}
-		}
-		return true;
-	}
-
-	/**
-	 * 合并集合,并且去掉生重复值
-	 * @param personNames
-	 * @param readPersonList
-	 * @return
-	 */
-	private List<String> mergeList(List<String> sourceList, List<String> targetList ) {
-		if( ListTools.isEmpty( sourceList )) {
-			return targetList;
-		}
-		for( String target : targetList ) {
-			if( !sourceList.contains( target )) {
-				sourceList.add( target );
-			}
-		}
-		return sourceList;
-	}
-
-	private void updateReview( EntityManagerContainer emc, Document document, List<String> personNames, List<String> unitNames, List<String> groupNames, Boolean isPublic ) throws Exception {
-		//先删除所有的Review信息,再重新添加Review信息
-		Review review = null;
-		Business business = new Business(emc);
-		document = emc.find( document.getId(), Document.class );
-		List<String> reviewIds = business.reviewFactory().listWithDocument(document.getId());
-				
-		if( !document.getDocStatus().equals("published")) {
-			return;
-		}
-		
-		emc.beginTransaction( Review.class );
-		emc.beginTransaction( Document.class );
-		
-		for( String id : reviewIds ) {
-			review = emc.find( id, Review.class );
-			emc.remove( review, CheckRemoveType.all );
-		}
-				
-		//再把加入新的Review
-		for( String personName : personNames ) {
-			review = new Review( document, "个人", personName, isPublic );
-			emc.persist( review, CheckPersistType.all );
-		}
-		for( String unitName : unitNames ) {
-			review = new Review( document, "组织", unitName, isPublic );
-			emc.persist( review, CheckPersistType.all );
-		}
-		for( String groupName : groupNames ) {
-			review = new Review( document, "群组", groupName, isPublic );
-			emc.persist( review, CheckPersistType.all );
-		}
-		document.setReviewed( true );
-		emc.check( document, CheckRemoveType.all );
-		emc.commit();
-	}
-
-	/**
-	 * 更新文档所有的Review信息
-	 * @param emc 
-	 * @param document
-	 * @param isPublic
-	 * @throws Exception 
-	 */
-	private void updateReview( EntityManagerContainer emc, Document document, Boolean isPublic ) throws Exception {
-		//先删除所有的Review信息,再重新添加Review信息
-		Review review = null;
-		Business business = new Business(emc);
-		document = emc.find( document.getId(), Document.class );
-		List<String> reviewIds = business.reviewFactory().listWithDocument(document.getId());
-		
-		emc.beginTransaction( Review.class );
-		emc.beginTransaction( Document.class );
-		for( String id : reviewIds ) {
-			review = emc.find( id, Review.class );
-			emc.remove( review, CheckRemoveType.all );
-		}
-		
-		//再把加入新的Review
-		review = new Review( document, "所有人", "所有人", isPublic );
-		document.setReviewed( true );
-		emc.persist( review, CheckPersistType.all );
-		emc.commit();
-	}
 }

+ 0 - 192
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/RescissoryClass_AppCategoryAdminService.java

@@ -1,192 +0,0 @@
-package com.x.cms.assemble.control.service;
-
-import java.util.List;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.entity.annotation.CheckPersistType;
-import com.x.base.core.entity.annotation.CheckRemoveType;
-import com.x.cms.assemble.control.Business;
-import com.x.cms.core.entity.AppCategoryAdmin;
-import com.x.cms.core.entity.AppInfo;
-import com.x.cms.core.entity.CategoryInfo;
-
-public class RescissoryClass_AppCategoryAdminService {
-
-	public List<String> listAppCategoryIdByCategoryId(EntityManagerContainer emc, String categoryId) throws Exception {
-		if( categoryId == null || categoryId.isEmpty() ){
-			return null;
-		}
-		Business business = new Business( emc );
-		return business.getAppCategoryAdminFactory().listAppCategoryIdByCategoryId( categoryId );
-	}
-
-	public List<AppCategoryAdmin> list(EntityManagerContainer emc, List<String> ids) throws Exception {
-		if( ids == null || ids.isEmpty() ){
-			return null;
-		}
-		Business business = new Business( emc );
-		return business.getAppCategoryAdminFactory().list( ids );
-	}
-
-	public List<String> listAppCategoryIdByAppId( EntityManagerContainer emc, String appId ) throws Exception {
-		if( appId == null || appId.isEmpty() ){
-			return null;
-		}
-		Business business = new Business( emc );
-		return business.getAppCategoryAdminFactory().listAppCategoryIdByAppId( appId );
-	}
-	
-	public List<String> listAppCategoryIdByCondition( EntityManagerContainer emc, String objectType, String objectId, String personName ) throws Exception {
-		Business business = new Business( emc );
-		return business.getAppCategoryAdminFactory().listAppCategoryIdByCondition( objectType, objectId, personName );
-	}
-
-	public List<String> listAppCategoryIdByUser(EntityManagerContainer emc, String person) throws Exception {
-		if( person == null || person.isEmpty() ){
-			return null;
-		}
-		Business business = new Business( emc );
-		return business.getAppCategoryAdminFactory().listAppCategoryIdByUser( person );
-	}
-
-	public List<String> listAppCategoryIdByAdminName(EntityManagerContainer emc, String person, String objectType ) throws Exception {
-		if( person == null || person.isEmpty() ){
-			return null;
-		}
-		if( objectType == null || objectType.isEmpty() ){
-			return null;
-		}
-		Business business = new Business( emc );
-		return business.getAppCategoryAdminFactory().listAppCategoryIdByAdminName( person, objectType );
-	}
-
-	public List<AppCategoryAdmin> listAll(EntityManagerContainer emc) throws Exception {
-		Business business = new Business( emc );
-		return business.getAppCategoryAdminFactory().listAll();
-	}
-
-	public AppCategoryAdmin id(EntityManagerContainer emc, String id) throws Exception {
-		Business business = new Business( emc );
-		return business.getAppCategoryAdminFactory().get( id );
-	}
-
-	public AppCategoryAdmin save( EntityManagerContainer emc, AppCategoryAdmin wi ) throws Exception {
-		if( wi == null ){
-			throw new Exception( "wrapIn is null!" );
-		}
-		AppCategoryAdmin appCategoryAdmin = null;
-		appCategoryAdmin = emc.find( wi.getId(), AppCategoryAdmin.class );
-		emc.beginTransaction( AppCategoryAdmin.class );
-		if( appCategoryAdmin != null ){
-			wi.copyTo( appCategoryAdmin );
-			emc.check( appCategoryAdmin, CheckPersistType.all );
-		}else{
-			appCategoryAdmin = new AppCategoryAdmin();
-			wi.copyTo( appCategoryAdmin, JpaObject.FieldsUnmodify  );
-			if( wi.getId() != null && !wi.getId().isEmpty() ) {
-				appCategoryAdmin.setId( wi.getId());
-			}
-			emc.persist( appCategoryAdmin, CheckPersistType.all );
-		}
-		emc.commit();
-		return appCategoryAdmin;
-	}
-
-	public void delete( EntityManagerContainer emc, String id ) throws Exception {
-		AppCategoryAdmin appCategoryAdmin = emc.find( id, AppCategoryAdmin.class );
-		if( appCategoryAdmin != null ){
-			emc.beginTransaction( AppCategoryAdmin.class );
-			emc.remove(appCategoryAdmin, CheckRemoveType.all);
-			emc.commit();
-		}else{
-			throw new Exception("appCategoryAdmin is not exists!");
-		}
-	}
-
-	public List<String> listManageableAppInfoIdsByPersonName( EntityManagerContainer emc, String personName, List<String> unitNames, 
-			List<String> groupNames, String documentType, Integer maxCount) throws Exception {
-		if( StringUtils.isEmpty( personName ) ){
-			throw new Exception( "personName is null!" );
-		}
-		Business business = new Business( emc );
-		return business.getAppInfoFactory().listManageableAppIdsByPerson(personName, unitNames, groupNames, documentType, maxCount );
-	}
-	
-	public List<String> listCategoryInfoIdsByAdminName( EntityManagerContainer emc, String name) throws Exception {
-		if( name == null || name.isEmpty() ){
-			throw new Exception( "name is null!" );
-		}
-		Business business = new Business( emc );
-		return business.getAppCategoryAdminFactory().listCategoryInfoIdsByAdminName( name );
-	}
-
-	public List<String> listCategoryInfoIdsByAdminName(EntityManagerContainer emc, String person, String documentType, String appId ) throws Exception {
-		if( person == null || person.isEmpty() ){
-			throw new Exception( "person is null!" );
-		}
-		if( appId == null || appId.isEmpty() ){
-			throw new Exception( "appId is null!" );
-		}
-		List<String> myCategoryIds = null;
-		Business business = new Business( emc );
-		myCategoryIds = business.getAppCategoryAdminFactory().listCategoryInfoIdsByAdminName( person );
-		if( myCategoryIds == null || myCategoryIds.isEmpty() ){
-			return null;
-		}
-		return business.getCategoryInfoFactory().listMyCategoryWithAppId( myCategoryIds, documentType, appId );
-	}
-
-	public void addNewAdminForAppInfo( EntityManagerContainer emc, AppInfo appInfo, String personName ) throws Exception {
-		if( appInfo == null ){
-			throw new Exception( "appInfo is null!" );
-		}		
-		List<String> myCategoryIds = null;
-		AppCategoryAdmin admin = null;
-		Business business = new Business( emc );
-		myCategoryIds = business.getAppCategoryAdminFactory().listAppCategoryIdByAppId( appInfo.getId(), personName );
-		if( myCategoryIds == null || myCategoryIds.isEmpty() ){
-			admin = new AppCategoryAdmin();
-			admin.setAdminLevel( "ADMIN" );
-			admin.setAdminName( personName );
-			admin.setAdminUid( personName );
-			admin.setCreatorUid( personName );
-			admin.setDescription( "应用栏目创建者,默认设定为管理员" );
-			admin.setObjectId( appInfo.getId() );
-			admin.setObjectType( "APPINFO" );
-			emc.beginTransaction(AppCategoryAdmin.class);
-			emc.persist( admin, CheckPersistType.all);
-			emc.commit();
-		}
-	}
-
-	public void addNewAdminForCategoryInfo(EntityManagerContainer emc, CategoryInfo categoryInfo, String personName ) throws Exception {
-		if( categoryInfo == null ){
-			throw new Exception( "categoryInfo is null!" );
-		}		
-		List<String> myCategoryIds = null;
-		AppCategoryAdmin admin = null;
-		Business business = new Business( emc );
-		myCategoryIds = business.getAppCategoryAdminFactory().listAppCategoryIdByAppId( categoryInfo.getId(), personName );
-		if( myCategoryIds == null || myCategoryIds.isEmpty() ){
-			admin = new AppCategoryAdmin();
-			admin.setAdminLevel( "ADMIN" );
-			admin.setAdminName( personName );
-			admin.setAdminUid( personName );
-			admin.setCreatorUid( personName );
-			admin.setDescription( "分类创建者,默认设定为管理员" );
-			admin.setObjectId( categoryInfo.getId() );
-			admin.setObjectType( "CATEGORY" );
-			emc.beginTransaction(AppCategoryAdmin.class);
-			emc.persist( admin, CheckPersistType.all);
-			emc.commit();
-		}
-	}
-
-	public List<String> listManageableCategoryIds(EntityManagerContainer emc, String name) throws Exception {
-		Business business = new Business( emc );
-		return business.getAppCategoryAdminFactory().listCategoryInfoIdsByAdminName( name );
-	}
-}

+ 0 - 109
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/RescissoryClass_AppCategoryAdminServiceAdv.java

@@ -1,109 +0,0 @@
-package com.x.cms.assemble.control.service;
-
-import java.util.List;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.cms.core.entity.AppCategoryAdmin;
-
-/**
- * 对栏目分类的管理员信息进行管理的服务类(高级)
- * 高级服务器可以利用Service完成事务控制
- * 
- * @author O2LEE
- */
-public class RescissoryClass_AppCategoryAdminServiceAdv {
-
-	private RescissoryClass_AppCategoryAdminService appCategoryAdminService = new RescissoryClass_AppCategoryAdminService();
-	
-	public List<AppCategoryAdmin> listAll() throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return appCategoryAdminService.listAll( emc );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-	
-	public List<String> listAppCategoryIdByCategoryId( String categoryId ) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return appCategoryAdminService.listAppCategoryIdByCategoryId( emc, categoryId );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-	
-	public List<String> listAppCategoryIdByCondition( String objectType, String objectId, String personName ) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return appCategoryAdminService.listAppCategoryIdByCondition(emc, objectType, objectId, personName);
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-	
-	public List<AppCategoryAdmin> list( List<String> ids ) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return appCategoryAdminService.list( emc, ids );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	public List<String> listAppCategoryIdByAppId( String appId ) throws Exception {
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return appCategoryAdminService.listAppCategoryIdByAppId( emc, appId );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	public List<String> listAppCategoryIdByUser( String person ) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return appCategoryAdminService.listAppCategoryIdByUser( emc, person );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	public List<String> listAppCategoryIdByAdminName(String person, String objectType) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return appCategoryAdminService.listAppCategoryIdByAdminName( emc, person, objectType );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	public AppCategoryAdmin get( String id ) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return appCategoryAdminService.id( emc, id );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	public AppCategoryAdmin save(  AppCategoryAdmin wi, EffectivePerson currentPerson ) throws Exception {
-		AppCategoryAdmin appCategoryAdmin = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			appCategoryAdmin = appCategoryAdminService.save( emc, wi );
-			return appCategoryAdmin;
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	public void delete( AppCategoryAdmin appCategoryAdmin, EffectivePerson currentPerson ) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			appCategoryAdminService.delete( emc, appCategoryAdmin.getId() );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	public List<String> listManageableCategoryIds(String name) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return appCategoryAdminService.listManageableCategoryIds( emc, name );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-}

+ 0 - 118
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/RescissoryClass_AppCategoryPermissionService.java

@@ -1,118 +0,0 @@
-package com.x.cms.assemble.control.service;
-
-import java.util.List;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.entity.annotation.CheckPersistType;
-import com.x.base.core.entity.annotation.CheckRemoveType;
-import com.x.cms.assemble.control.Business;
-import com.x.cms.core.entity.AppCategoryPermission;
-
-public class RescissoryClass_AppCategoryPermissionService {
-
-	public AppCategoryPermission get(EntityManagerContainer emc, String id) throws Exception {
-		Business business = new Business( emc );
-		return business.getAppCategoryPermissionFactory().get( id );
-	}
-	
-	public List<AppCategoryPermission> list(EntityManagerContainer emc, List<String> ids) throws Exception {
-		if( ids == null || ids.isEmpty() ){
-			return null;
-		}
-		Business business = new Business( emc );
-		return business.getAppCategoryPermissionFactory().list( ids );
-	}	
-
-	public AppCategoryPermission save( EntityManagerContainer emc, AppCategoryPermission wrapIn ) throws Exception {
-		if( wrapIn == null ){
-			throw new Exception( "wrapIn is null!" );
-		}
-		AppCategoryPermission appCategoryPermission = null;
-		appCategoryPermission = emc.find( wrapIn.getId(), AppCategoryPermission.class );
-		if( appCategoryPermission != null ){
-			wrapIn.copyTo( appCategoryPermission );
-			emc.beginTransaction( AppCategoryPermission.class );
-			emc.check( appCategoryPermission, CheckPersistType.all );
-			emc.commit();
-		}else{
-			appCategoryPermission = new AppCategoryPermission();
-			wrapIn.copyTo( appCategoryPermission, JpaObject.FieldsUnmodify );
-			if( wrapIn.getId() != null && !wrapIn.getId().isEmpty() ) {
-				appCategoryPermission.setId( wrapIn.getId() );
-			}
-			emc.beginTransaction( AppCategoryPermission.class );
-			emc.persist( appCategoryPermission, CheckPersistType.all );
-			emc.commit();
-		}
-		return appCategoryPermission;
-	}
-
-	public void delete( EntityManagerContainer emc, String id ) throws Exception {
-		AppCategoryPermission appCategoryPermission = emc.find( id, AppCategoryPermission.class );
-		if( appCategoryPermission != null ){
-			emc.beginTransaction( AppCategoryPermission.class );
-			emc.remove(appCategoryPermission, CheckRemoveType.all);
-			emc.commit();
-		}else{
-			throw new Exception("appCategoryPermission is not exists!");
-		}
-	}
-	
-	public List<String> listPermissionByAppInfo( EntityManagerContainer emc, String appId, String permission ) throws Exception {
-		Business business = new Business( emc );
-		return business.getAppCategoryPermissionFactory().listPermissionByAppInfo( appId, permission );
-	}
-	
-	public List<String> listPermissionByCategory(EntityManagerContainer emc, String categoryId, String permission) throws Exception {
-		Business business = new Business( emc );
-		return business.getAppCategoryPermissionFactory().listPermissionByCataogry( categoryId, permission );
-	}
-	
-	/**
-	 * 根据用户姓名以及用户所在的顶层组织和组织列表查询该用户可以访问到的所有应用栏目ID列表
-	 * 不用判断可见和发布权限 ,发布的人员肯定可见,只需要distinct就行
-	 * @param emc
-	 * @param name
-	 * @param unitNames
-	 * @param topUnitNames
-	 * @param groupNames 
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listAppInfoIdsByPermission( EntityManagerContainer emc, String name, List<String> unitNames, List<String> groupNames, String permission ) throws Exception {
-		Business business = new Business( emc );
-		return business.getAppCategoryPermissionFactory().listAppInfoIdsByPermission( name, unitNames, groupNames, null, permission );
-	}
-	
-	public List<String> listAppInfoIdsByPermission( EntityManagerContainer emc, String name, List<String> unitNames, List<String> groupNames, String appId, String permission ) throws Exception {
-		Business business = new Business( emc );
-		return business.getAppCategoryPermissionFactory().listAppInfoIdsByPermission( name, unitNames, groupNames, appId, permission );
-	}
-
-	public List<String> listAllAppInfoIds( EntityManagerContainer emc, String type, String permission ) throws Exception {
-		Business business = new Business( emc );
-		return business.getAppCategoryPermissionFactory().listAllAppInfoIds( type, permission);
-	}
-	
-	public List<String> listAppCategoryIdByCondition( EntityManagerContainer emc, String objectType, String objectId, String personName, String permission ) throws Exception {
-		Business business = new Business( emc );
-		return business.getAppCategoryPermissionFactory().listAppCategoryIdByCondition( objectType, objectId, personName, permission );
-	}
-	
-	public List<String> listCategoryIdsByPermission( EntityManagerContainer emc, String name, List<String> unitNames, List<String> groupNames, String appId, String permission ) throws Exception {
-		Business business = new Business( emc );		
-		return business.getAppCategoryPermissionFactory().listCategoryIdsByPermission( name, unitNames, groupNames, appId, permission );
-	}
-	
-	public List<String> listAllCategoryIds( EntityManagerContainer emc, String permission ) throws Exception {
-		Business business = new Business( emc );
-		return business.getAppCategoryPermissionFactory().listAllCategoryInfoIds( permission);
-	}
-
-	public List<String> listAppInfoIdsByPermission(EntityManagerContainer emc, List<String> queryObjectNames,
-			String queryObjectType, String objectType, String permission) throws Exception {
-		Business business = new Business( emc );
-		return business.getAppCategoryPermissionFactory().listAppInfoIdsByPermission( queryObjectNames, queryObjectType, objectType, permission );
-	}
-}

+ 0 - 278
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/RescissoryClass_AppCategoryPermissionServiceAdv.java

@@ -1,278 +0,0 @@
-package com.x.cms.assemble.control.service;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.cms.core.entity.AppCategoryAdmin;
-import com.x.cms.core.entity.AppCategoryPermission;
-
-/**
- * 对栏目分类的使用权限信息进行管理的服务类(高级)
- * 高级服务器可以利用Service完成事务控制
- * 
- * @author O2LEE
- */
-public class RescissoryClass_AppCategoryPermissionServiceAdv {
-
-	private UserManagerService userManagerService = new UserManagerService();
-	private CategoryInfoService categoryInfoService = new CategoryInfoService();
-	private RescissoryClass_AppCategoryAdminService appCategoryAdminService = new RescissoryClass_AppCategoryAdminService();
-	private RescissoryClass_AppCategoryPermissionService appCategoryPermissionService = new RescissoryClass_AppCategoryPermissionService();
-
-	public AppCategoryPermission get( String id ) throws Exception {
-		if( id == null || id.isEmpty() ){
-			return null;
-		}
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return appCategoryPermissionService.get( emc, id );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-	
-	public List<AppCategoryPermission> list( List<String> ids ) throws Exception {
-		if( ids == null || ids.isEmpty() ){
-			return null;
-		}
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return appCategoryPermissionService.list( emc, ids );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	public AppCategoryPermission save( AppCategoryPermission wrapIn, EffectivePerson currentPerson ) throws Exception {
-		AppCategoryPermission appCategoryPermission = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			appCategoryPermission = appCategoryPermissionService.save( emc, wrapIn );
-			return appCategoryPermission;
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	public void delete( AppCategoryPermission appCategoryPermission, EffectivePerson currentPerson ) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			appCategoryPermissionService.delete( emc, appCategoryPermission.getId() );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-	
-	public List<String> listPermissionByAppInfo( String appId, String permission ) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return appCategoryPermissionService.listPermissionByAppInfo( emc, appId, permission );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-	
-	public List<String> listPermissionByCategory(String categoryId, String permission) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return appCategoryPermissionService.listPermissionByCategory( emc, categoryId, permission );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	public List<String> listAppCategoryIdByCondition( String objectType, String objectId, String distinguishedName, String permission ) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return appCategoryPermissionService.listAppCategoryIdByCondition(emc, objectType, objectId, distinguishedName, permission);
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-	
-	public List<String> listAppCategoryIdByPermission( String objectType, String objectId, String distinguishedName, String permission ) throws Exception {
-		List<String> unitNames = null;
-		List<String> groupNames = null;
-		
-		if( distinguishedName != null && !distinguishedName.isEmpty() ){
-			unitNames = userManagerService.listUnitNamesWithPerson( distinguishedName );
-			groupNames = userManagerService.listGroupNamesByPerson( distinguishedName );
-		}		
-		
-		if( "CATEGORY".equals( objectType )){
-			try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-				return appCategoryPermissionService.listCategoryIdsByPermission( emc, distinguishedName, unitNames, groupNames, objectId, permission );
-			} catch ( Exception e ) {
-				throw e;
-			}
-		}else{
-			try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-				return appCategoryPermissionService.listAppInfoIdsByPermission( emc, distinguishedName, unitNames, groupNames, objectId, permission );
-			} catch ( Exception e ) {
-				throw e;
-			}
-		}
-	}
-
-	/**
-	 * 查询用户可以看到的所有栏目ID列表
-	 * 权限:可管理、可见、可发布
-	 * @param distinguishedName
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> getViewableAppInfoIds( String distinguishedName ) throws Exception {
-		List<String> queryObjectNames = userManagerService.getPersonPermissionCodes( distinguishedName );
-		return getViewableAppInfoIds( distinguishedName, queryObjectNames );
-	}
-	/**
-	 * 查询用户可以看到的所有栏目ID列表
-	 * 权限:可管理、可见、可发布
-	 * @param distinguishedName
-	 * @param queryObjectNames
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> getViewableAppInfoIds( String distinguishedName, List<String> queryObjectNames ) throws Exception {
-		List<String> viewable_appInfo_ids = new ArrayList<>();
-		List<AppCategoryAdmin> appCategoryAdminList = null;
-		List<String> ids = null;
-		//查询有管理权限的栏目ID列表,可管理,可发布,可见	
-		//1、可管理的所有APPINFO(CMS_APPCATEGORY_ADMIN表)
-		ids = listAppCategoryIdByAdminName( distinguishedName, "APPINFO" );
-		if( ids != null && !ids.isEmpty() ) {
-			try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-				appCategoryAdminList = appCategoryAdminService.list(emc, ids);
-			} catch ( Exception e ) {
-				throw e;
-			}
-			if( appCategoryAdminList != null ) {
-				for( AppCategoryAdmin appCategoryAdmin : appCategoryAdminList ) {
-					if( !viewable_appInfo_ids.contains( appCategoryAdmin.getObjectId() )) {
-						viewable_appInfo_ids.add( appCategoryAdmin.getObjectId() );
-					}
-				}
-			}
-		}
-		
-		//2、可发布、可见的所有APPINFO(CMS_APPCATEGORY_PERMISSION表)
-		ids = listAppCategoryIdByPermission( queryObjectNames, null, "APPINFO", null );
-		if( ids != null && !ids.isEmpty() ) {
-			for( String id : ids ) {
-				if( !viewable_appInfo_ids.contains( id )) {
-					viewable_appInfo_ids.add( id );
-				}
-			}
-		}
-		return viewable_appInfo_ids;
-	}
-	
-	/**
-	 * 直接单独从权限表中查询用户有权限访问的分类,不涉及栏目的权限以及栏目的嵌套分类
-	 * @param distinguishedName
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> getViewableCategoriesWithOnlyPermissionRecord( String distinguishedName ) throws Exception {
-		List<String> queryObjectNames = userManagerService.getPersonPermissionCodes( distinguishedName );
-		return getViewableCategoriesWithOnlyPermissionRecord( distinguishedName, queryObjectNames );
-	}
-	/**
-	 * 直接单独从权限表中查询用户有权限访问的分类,不涉及栏目的权限以及栏目的嵌套分类
-	 * @param distinguishedName
-	 * @param queryObjectNames
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> getViewableCategoriesWithOnlyPermissionRecord( String distinguishedName, List<String> queryObjectNames ) throws Exception {
-		List<String> viewable_category_ids = new ArrayList<>();
-		List<AppCategoryAdmin> appCategoryAdminList = null;
-		List<String> ids = null;
-		
-		//查询有管理权限的栏目ID列表,可管理,可发布,可见	
-		//1、可管理的所有APPINFO(CMS_APPCATEGORY_ADMIN表)
-		ids = listAppCategoryIdByAdminName( distinguishedName, "CATEGORY" );
-		if( ids != null && !ids.isEmpty() ) {
-			try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-				appCategoryAdminList = appCategoryAdminService.list(emc, ids);
-			} catch ( Exception e ) {
-				throw e;
-			}
-			if( appCategoryAdminList != null ) {
-				for( AppCategoryAdmin appCategoryAdmin : appCategoryAdminList ) {
-					if( !viewable_category_ids.contains( appCategoryAdmin.getObjectId() )) {
-						viewable_category_ids.add( appCategoryAdmin.getObjectId() );
-					}
-				}
-			}
-		}
-		//2、可发布、可见的所有APPINFO(CMS_APPCATEGORY_PERMISSION表)
-		ids = listAppCategoryIdByPermission( queryObjectNames, null, "CATEGORY", null );
-		if( ids != null && ids.isEmpty() ) {
-			for( String id : ids ) {
-				if( !viewable_category_ids.contains( id )) {
-					viewable_category_ids.add( id );
-				}
-			}
-		}
-		return viewable_category_ids;
-	}
-	
-	/**
-	 * 查询用户可以看到的所有分类(嵌套可见的栏目的所有下级分类)
-	 * 权限:可管理、可见、可发布
-	 * @param distinguishedName
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> getViewableCatagoriesWithPerson( String distinguishedName ) throws Exception {
-		List<String> queryObjectNames = null;
-		List<String> appInfo_ids = null;
-		List<String> category_ids = null;
-		List<String> viewableCatagories = new ArrayList<>();
-		
-		//选查询个人涉及的所有组织角色以及群组编码
-		queryObjectNames = userManagerService.getPersonPermissionCodes( distinguishedName );
-
-		//查询有管理权限的栏目ID列表,可管理,可发布,可见	
-		appInfo_ids = getViewableAppInfoIds( distinguishedName, queryObjectNames );
-		
-		//可见栏目下的所有分类都应该可见,加入到可见分类列表中
-		if( appInfo_ids != null && !appInfo_ids.isEmpty() ){
-			for( String appId : appInfo_ids ){
-				category_ids = categoryInfoService.listByAppId( appId );
-				if( category_ids != null && !category_ids.isEmpty() ){
-					for( String categoryId : category_ids ){
-						if( !viewableCatagories.contains( categoryId )){
-							viewableCatagories.add( categoryId );
-						}
-					}
-				}
-			}
-		}
-		
-		//再查询单独配置的可管理,可见,可发布的分类(栏目不一定可见,可管理,可发布)
-		category_ids = getViewableCategoriesWithOnlyPermissionRecord( distinguishedName, queryObjectNames );
-		if( category_ids != null && !category_ids.isEmpty() ){
-			for( String categoryId : category_ids ){
-				if( !viewableCatagories.contains( categoryId )){
-					viewableCatagories.add( categoryId );
-				}
-			}
-		}
-		
-		return viewableCatagories;
-	}
-	
-	private List<String> listAppCategoryIdByPermission(List<String> queryObjectNames, String queryObjectType, String objectType, String permission) throws Exception {
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
-			return appCategoryPermissionService.listAppInfoIdsByPermission( emc, queryObjectNames, queryObjectType, objectType, permission );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	public List<String> listAppCategoryIdByAdminName( String person, String objectType ) throws Exception {
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
-			return appCategoryAdminService.listAppCategoryIdByAdminName( emc, person, objectType );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-}

+ 0 - 237
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/RescissoryClass_DocumentPermissionService.java

@@ -1,237 +0,0 @@
-package com.x.cms.assemble.control.service;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.entity.annotation.CheckPersistType;
-import com.x.base.core.entity.annotation.CheckRemoveType;
-import com.x.cms.assemble.control.Business;
-import com.x.cms.assemble.control.jaxrs.permission.element.PermissionInfo;
-import com.x.cms.assemble.control.jaxrs.permission.element.PermissionName;
-import com.x.cms.core.entity.Document;
-import com.x.cms.core.entity.DocumentPermission;
-import com.x.cms.core.entity.tools.DateOperation;
-
-public class RescissoryClass_DocumentPermissionService {
-
-	public List<DocumentPermission> list( EntityManagerContainer emc, List<String> ids ) throws Exception {
-		if( ids == null || ids.isEmpty() ){
-			return null;
-		}
-		Business business = new Business( emc );
-		return business.documentPermissionFactory().list( ids );
-	}
-
-	public void deleteByDocumentId( EntityManagerContainer emc, String docId ) throws Exception {
-		if( docId == null ){
-			throw new Exception("文档对象document为空!");
-		}
-		List<String> ids = null;
-		DocumentPermission permission = null;
-		ids = new Business( emc ).documentPermissionFactory().listIdsByDocumentId( docId );
-		if( ids != null && ids.isEmpty() ){
-			for( String id : ids ){
-				permission = emc.find( id, DocumentPermission.class );
-				emc.beginTransaction( DocumentPermission.class );
-				emc.remove( permission, CheckRemoveType.all );
-				emc.commit();
-			}
-		}
-	}
-	
-	public void refreshDocumentPermission( EntityManagerContainer emc, Document document, List<PermissionInfo> new_permissionList ) throws Exception {
-		if( document == null ){
-			throw new Exception( "document is null!" );
-		}
-		if( new_permissionList == null ){
-			new_permissionList = new ArrayList<>();
-		}
-		List<String> ids = null;
-		String docId = document.getId();
-		DocumentPermission documentPermission = null;
-		List<DocumentPermission> permissionList = new ArrayList<>();
-		String updateFlag = new DateOperation().getNowTimeChar();
-		
-		Business business = new Business( emc );		
-		
-		//拟稿人应该有管理和阅读的权限
-		permissionList = addPersonDocumentPermission( document.getCreatorPerson(), PermissionName.MANAGER, document, permissionList, updateFlag );
-		permissionList = addPersonDocumentPermission( document.getCreatorPerson(),  PermissionName.READER, document, permissionList, updateFlag );
-		permissionList = addPersonDocumentPermission( document.getCreatorPerson(),  PermissionName.AUTHOR, document, permissionList, updateFlag );
-				
-		//将传入的权限信息转换成权限对象
-		for( PermissionInfo permission : new_permissionList ){
-			documentPermission = createPermissionWithDocument( document, permission.getPermission(), permission.getPermissionObjectName(), permission.getPermissionObjectType(), permission.getPermissionObjectCode() );	
-			documentPermission.setUpdateFlag( updateFlag );
-			permissionList.add( documentPermission );
-		}
-		
-		if( permissionList != null && !permissionList.isEmpty() ){
-			for( DocumentPermission permission : permissionList ){
-				ids = business.documentPermissionFactory().listIds( docId, permission.getPermission(), permission.getPermissionObjectType(), permission.getPermissionObjectCode() );
-				emc.beginTransaction( DocumentPermission.class );
-				if( ids == null || ids.isEmpty() ){
-					permission.setUpdateFlag( updateFlag ); //修改更新标识
-					permission.setCategoryAlias( document.getCategoryAlias() );
-					emc.persist( permission, CheckPersistType.all );
-				}else{
-					for( String id: ids ){
-						permission = emc.find( id, DocumentPermission.class );
-						permission.setTitle( document.getTitle() );
-						permission.setUpdateFlag( updateFlag ); //修改更新标识
-						permission.setCategoryAlias( document.getCategoryAlias() );
-						emc.check( permission, CheckPersistType.all );
-					}
-				}
-				emc.commit();
-			}
-		}
-				
-		//把没有被更新过的信息删除
-		ids = business.documentPermissionFactory().listNoModifyIds( docId, updateFlag );
-		if( ids != null && !ids.isEmpty() ){
-			for( String id: ids ){
-				documentPermission = emc.find( id, DocumentPermission.class );
-				emc.beginTransaction( DocumentPermission.class );
-				emc.remove( documentPermission, CheckRemoveType.all );
-				emc.commit();
-			}
-		}
-		
-		//使用新的数据结构存储  Begin=================================================
-		document = emc.find( document.getId() , Document.class );
-		
-		emc.beginTransaction( Document.class );
-		
-		document.setManagerList( null );
-		document.setReadPersonList( null );
-		document.setReadUnitList( null );
-		document.setReadGroupList( null );
-		document.setAuthorPersonList( null );
-		document.setAuthorUnitList( null );
-		document.setAuthorGroupList( null );
-		
-		document.addManagerList( document.getCreatorPerson() );
-		document.addReadPersonList( document.getCreatorPerson() );
-		document.addAuthorPersonList( document.getCreatorPerson() );
-		
-		if( permissionList != null && !permissionList.isEmpty() ){
-			for( DocumentPermission permission : permissionList ){
-				if( "管理".equals( permission.getPermission() )) {
-					document.addManagerList(permission.getPermissionObjectCode());
-				}else if( "读者".equals( permission.getPermission() )) {
-					if( "人员".equals( permission.getPermissionObjectType() )) {
-						document.addReadPersonList(permission.getPermissionObjectCode());
-					}else if( "部门".equals(  permission.getPermissionObjectType() )) {
-						document.addReadUnitList(permission.getPermissionObjectCode());
-					}else if( "群组".equals( permission.getPermissionObjectType() )) {
-						document.addReadGroupList(permission.getPermissionObjectCode());
-					}else if( "所有人".equals( permission.getPermissionObjectCode() )) {
-						document.addReadPersonList("所有人");
-					}
-				}else if( "阅读".equals( permission.getPermission() )) {
-					if( "人员".equals( permission.getPermissionObjectType() )) {
-						document.addReadPersonList(permission.getPermissionObjectCode());
-					}else if( "部门".equals(  permission.getPermissionObjectType() )) {
-						document.addReadUnitList(permission.getPermissionObjectCode());
-					}else if( "群组".equals( permission.getPermissionObjectType() )) {
-						document.addReadGroupList(permission.getPermissionObjectCode());
-					}else if( "所有人".equals( permission.getPermissionObjectCode() )) {
-						document.addReadPersonList("所有人");
-					}
-				}else if( "作者".equals( permission.getPermission() )) {
-					if( "人员".equals( permission.getPermissionObjectType() )) {
-						document.addAuthorPersonList(permission.getPermissionObjectCode());
-					}else if( "部门".equals(  permission.getPermissionObjectType() )) {
-						document.addAuthorUnitList(permission.getPermissionObjectCode());
-					}else if( "群组".equals( permission.getPermissionObjectType() )) {
-						document.addAuthorGroupList(permission.getPermissionObjectCode());
-					}else if( "所有人".equals( permission.getPermissionObjectCode() )) {
-						document.addAuthorPersonList("所有人");
-					}
-				}
-			}
-		}
-		
-		emc.check( document , CheckPersistType.all );
-		//使用新的数据结构存储  Over=================================================		
-	}
-
-	/**
-	 * 给用户管理和阅读权限
-	 * @param personName
-	 * @param document
-	 * @param permissionList
-	 * @param updateFlag
-	 * @return
-	 * @throws Exception
-	 */
-	public List<DocumentPermission> addPersonDocumentPermission( String personName, String permission, Document document, List<DocumentPermission> permissionList, String updateFlag ) throws Exception{
-		if( document == null ){
-			throw new Exception("document is null!");
-		}
-		if( personName == null ){
-			throw new Exception("personName is null!");
-		}
-		if( permissionList == null ){
-			permissionList = new ArrayList<>();
-		}		
-		DocumentPermission new_permission = createPermissionWithDocument( document, permission, personName, "人员", personName );
-		new_permission.setUpdateFlag(updateFlag);
-		permissionList.add( new_permission );
-		return permissionList;
-	}
-
-	public List<String> listDocumentPermission( EntityManagerContainer emc, String docId, List<String> permissionCodes,
-			String permission) throws Exception {
-		if( docId == null || docId.isEmpty() ){
-			throw new Exception("docId is null!");
-		}
-		if( permission == null || permission.isEmpty() ){
-			throw new Exception("permission is null!");
-		}
-		if( permissionCodes == null || permissionCodes.isEmpty() ){
-			return null;
-		}
-		Business business = new Business( emc );
-		return business.documentPermissionFactory().listIds( docId, permissionCodes, permission );
-	}
-	
-	/**
-	 * 根据文档数据创建一个文档权限信息对象
-	 * @param document
-	 * @param permission
-	 * @param permissionObjectName
-	 * @param permissionObjectType
-	 * @param permissionObjectCode
-	 * @return
-	 */
-	private DocumentPermission createPermissionWithDocument(Document document, String permission, String permissionObjectName, String permissionObjectType, String permissionObjectCode ) {
-		DocumentPermission documentPermission = new DocumentPermission();
-		documentPermission.setDocumentId( document.getId() );
-		documentPermission.setTitle( document.getTitle() );
-		documentPermission.setAppId( document.getAppId() );
-		documentPermission.setAppName( document.getAppName());
-		documentPermission.setCategoryId( document.getCategoryId() );
-		documentPermission.setCategoryName( document.getCategoryName() );
-		documentPermission.setCategoryAlias( document.getCategoryAlias() );
-		documentPermission.setDocumentStatus( document.getDocStatus() );
-		documentPermission.setPermission( permission );
-		documentPermission.setPermissionObjectName( permissionObjectName );
-		documentPermission.setPermissionObjectType( permissionObjectType );
-		documentPermission.setPermissionObjectCode( permissionObjectCode );
-		documentPermission.setDocCreateDate( document.getCreateTime() );
-		documentPermission.setPublishDate( document.getPublishTime() );
-		documentPermission.setPublisher( document.getCreatorPerson() );
-		return documentPermission;
-	}
-
-	public List<String> listPermissionIdsWithDocId(EntityManagerContainer emc, String docId) throws Exception {
-		if( docId == null || docId.isEmpty() ){
-			throw new Exception("docId is null!");
-		}
-		Business business = new Business( emc );
-		return business.documentPermissionFactory().listIdsByDocumentId(docId);
-	}
-}

+ 0 - 106
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/service/RescissoryClass_DocumentPermissionServiceAdv.java

@@ -1,106 +0,0 @@
-package com.x.cms.assemble.control.service;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.cms.assemble.control.jaxrs.permission.element.PermissionInfo;
-import com.x.cms.assemble.control.jaxrs.permission.element.PermissionName;
-import com.x.cms.core.entity.Document;
-import com.x.cms.core.entity.DocumentPermission;
-
-/**
- * 对文档访问过滤权限信息进行管理的服务类(高级)
- * 高级服务器可以利用Service完成事务控制
- * 
- * @author O2LEE
- */
-public class RescissoryClass_DocumentPermissionServiceAdv {
-	
-	private UserManagerService userManagerService = new UserManagerService();
-	private RescissoryClass_DocumentPermissionService documentPermissionService = new RescissoryClass_DocumentPermissionService();
-	
-	public List<DocumentPermission> list( List<String> ids ) throws Exception {
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
-			return documentPermissionService.list( emc, ids );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 根据文档ID,为文档设置用户访问和管理权限
-	 * @param document
-	 * @param readerList
-	 * @param authorList
-	 * @throws Exception
-	 */
-	public void refreshDocumentPermission( Document document, List<PermissionInfo> readerList, List<PermissionInfo> authorList ) throws Exception {
-		List<PermissionInfo> permissionList = new ArrayList<>();
-		
-		//添加读者信息,如果没有限定读者,那么所有可访问分类的用户可读
-		if ( readerList == null || readerList.isEmpty() ) {
-			permissionList.add( new PermissionInfo( PermissionName.READER, "所有人", "所有人", "所有人" ) );
-		} else {
-			for( PermissionInfo p : readerList ) {
-				permissionList.add( new PermissionInfo( PermissionName.READER, p.getPermissionObjectType(), p.getPermissionObjectName(), p.getPermissionObjectName() ));
-			}
-			//将所有的作者都添加到阅读者里去
-			if ( authorList != null && !authorList.isEmpty() ) {
-				for( PermissionInfo p : authorList ) {
-					permissionList.add( new PermissionInfo( PermissionName.READER, p.getPermissionObjectType(), p.getPermissionObjectName(), p.getPermissionObjectName() ));
-				}
-			}
-		}
-		//添加作者信息,作者可以对文档进行编辑
-		if ( authorList != null && !authorList.isEmpty() ) {
-			for( PermissionInfo p : authorList ) {
-				permissionList.add( new PermissionInfo( PermissionName.AUTHOR, p.getPermissionObjectType(), p.getPermissionObjectName(), p.getPermissionObjectName() ));
-			}
-		}
-		//将读者以及作者信息持久化到数据库中
-		try {
-			refreshDocumentPermission( document, permissionList );
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-	
-	/**
-	 * 根据文档ID,为文档设置用户访问和管理权限
-	 * @param docmentId
-	 * @param permissionList
-	 * @throws Exception 
-	 */
-	public void refreshDocumentPermission( Document docment, List<PermissionInfo> permissionList ) throws Exception {
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
-			documentPermissionService.refreshDocumentPermission( emc, docment, permissionList );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	
-
-	public List<String> listPermissionIdsWithPerson(String docId, String distinguishedName, String permission ) throws Exception {
-		List<String> permissionCodes = userManagerService.getPersonPermissionCodes( distinguishedName );
-		if( permissionCodes == null || permissionCodes.isEmpty() ) {
-			return null;
-		}else {
-			try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
-				return documentPermissionService.listDocumentPermission( emc, docId, permissionCodes, permission );
-			} catch ( Exception e ) {
-				throw e;
-			}
-		}
-	}
-
-	public List<String> listPermissionIdsWithDocId(String docId) throws Exception {
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
-			return documentPermissionService.listPermissionIdsWithDocId( emc, docId );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-}

+ 0 - 98
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/timertask/Timertask_DocumentReviewTask.java

@@ -1,98 +0,0 @@
-package com.x.cms.assemble.control.timertask;
-
-import java.util.List;
-
-import org.quartz.Job;
-import org.quartz.JobExecutionContext;
-import org.quartz.JobExecutionException;
-
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.base.core.project.tools.ListTools;
-import com.x.cms.assemble.control.service.AppInfoServiceAdv;
-import com.x.cms.assemble.control.service.CategoryInfoServiceAdv;
-import com.x.cms.assemble.control.service.DocumentInfoServiceAdv;
-import com.x.cms.assemble.control.service.PermissionOperateService;
-import com.x.cms.core.entity.AppInfo;
-import com.x.cms.core.entity.CategoryInfo;
-
-/**
- * 定时代理:定期进行对栏目,分类修改的分析,对文档Review的更新
- * 
- * @author O2LEE
- *
- */
-public class Timertask_DocumentReviewTask implements Job {
-
-	private static Logger logger = LoggerFactory.getLogger(Timertask_DocumentReviewTask.class);
-	private static AppInfoServiceAdv appInfoServiceAdv = new AppInfoServiceAdv();
-	private static CategoryInfoServiceAdv categoryInfoServiceAdv = new CategoryInfoServiceAdv();
-	private static DocumentInfoServiceAdv documentInfoServiceAdv = new DocumentInfoServiceAdv();
-	private static PermissionOperateService permissionOperateService = new PermissionOperateService();
-	
-	@Override
-	public void execute(JobExecutionContext arg0) throws JobExecutionException {		
-		logger.info("CMS Timertask_DocumentReviewTask excute begin......");
-		try {
-			//查询所有reviewed=false的栏目,将所有栏目涉及到的所有CategoryInfo打上reviewed=false, 然后栏目reviewed=true
-			List<String> documentIds = null;
-			List<CategoryInfo> categoryList = null;
-			List<AppInfo> appInfoList = appInfoServiceAdv.listInReviewAppInfoList();
-			if( ListTools.isNotEmpty( appInfoList )) {
-				for( AppInfo appInfo : appInfoList ) {
-					//查询所有的Category, Category不会很多,一次性查完
-					categoryList = categoryInfoServiceAdv.listByAppId( appInfo.getId() );
-					if( ListTools.isNotEmpty( categoryList )) {
-						for( CategoryInfo categoryInfo : categoryList ) {
-							try {
-								categoryInfoServiceAdv.inReview( categoryInfo.getId() );
-							}catch( Exception e ) {
-								e.printStackTrace( );
-							}
-						}
-					}
-					appInfoServiceAdv.reviewed( appInfo.getId() );
-				}
-			}
-			
-			//查询所有reviewed=false的分类信息,分析所有的文档,给文档打上reviewed=false,然后分类reviewed=true
-			categoryList = categoryInfoServiceAdv.listInReviewCategoryInfoList();
-			if( ListTools.isNotEmpty( categoryList )) {
-				for( CategoryInfo categoryInfo : categoryList ) {
-					//logger.info("CMS Timertask_DocumentReviewTask flag document to inreview, category:" + categoryInfo.getId() );
-					//查询所有的文档,把所有的文档都标识为reviewed =false
-					documentIds = documentInfoServiceAdv.listReviewedIdsByCategoryId( categoryInfo.getId(), 1000 );
-					do{
-						if( ListTools.isNotEmpty( documentIds )) {
-							for( String documentId : documentIds ) {
-								//logger.info("CMS Timertask_DocumentReviewTask flag document to inreview, document:" + documentId );
-								documentInfoServiceAdv.inReview( documentId );
-							}
-						}
-						documentIds = documentInfoServiceAdv.listReviewedIdsByCategoryId( categoryInfo.getId(), 1000 );
-					}while( ListTools.isNotEmpty( documentIds ) );
-					categoryInfoServiceAdv.reviewed( categoryInfo.getId() );
-				}
-			}
-			
-			//查询1000个reviewed=false的文档,更新文档Review
-			documentIds = documentInfoServiceAdv.listInReviewIds( 1000 );
-			int maxTimes = 5; //查询执行3次
-			do {
-				maxTimes--;
-				if( ListTools.isNotEmpty( documentIds ) ) {
-					for( String documentId : documentIds ) {
-						//logger.info("CMS Timertask_DocumentReviewTask refreshReview document:" + documentId );
-						permissionOperateService.refreshReview(documentId);
-					}
-				}
-				documentIds = documentInfoServiceAdv.listInReviewIds( 1000 );
-			}while( maxTimes > 0 && ListTools.isNotEmpty( documentIds ) );
-			logger.info("CMS Timertask_DocumentReviewTask excute completed!");
-		} catch (Exception e) {
-			logger.warn("Timertask_DocumentReviewTask operation logs excute got an exception.");
-			logger.error(e);
-		}
-	}
-
-}

+ 0 - 1
o2server/x_cms_assemble_control/src/main/java/com/x/cms/assemble/control/timertask/Timertask_LogRecordCheckTask.java

@@ -4,7 +4,6 @@ import org.quartz.Job;
 import org.quartz.JobExecutionContext;
 import org.quartz.JobExecutionException;
 
-import com.x.base.core.project.Context;
 import com.x.base.core.project.logger.Logger;
 import com.x.base.core.project.logger.LoggerFactory;
 import com.x.cms.assemble.control.service.DocumentViewRecordServiceAdv;