Zhou Rui 5 лет назад
Родитель
Сommit
af92f31098
100 измененных файлов с 12057 добавлено и 178 удалено
  1. 3 2
      .gitignore
  2. 1 1
      README.md
  3. 1 1
      gulpfile.js
  4. 4 0
      o2server/version.o2
  5. 113 125
      o2server/x_base_core_project/src/main/java/com/x/base/core/container/EntityManagerContainer.java
  6. 3 3
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/build/CreateVersion.java
  7. 45 44
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/build/PackageO2server.java
  8. 1 2
      o2server/x_base_core_project/src/main/java/com/x/base/core/project/executor/ProcessPlatformExecutorFactory.java
  9. 1 0
      o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/jaxrs/configsetting/BBSConfigSettingAnonymousAction.java
  10. 3983 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/describe.json
  11. 32 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/AbstractFactory.java
  12. 32 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/ApplicationServletContextListener.java
  13. 66 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/Business.java
  14. 5 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/EnumCalendarSource.java
  15. 5 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/EnumCalendarTaskType.java
  16. 5 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/EnumRemindPolicy.java
  17. 13 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/ExceptionWrapInConvert.java
  18. 7 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/MimeTypeDefinition.java
  19. 210 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/ThisApplication.java
  20. 157 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/factory/CalendarFactory.java
  21. 104 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/factory/Calendar_EventCommentFactory.java
  22. 244 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/factory/Calendar_EventFactory.java
  23. 184 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/factory/Calendar_EventRepeatMasterFactory.java
  24. 114 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/factory/Calendar_SettingFactory.java
  25. 27 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/factory/MessageFactory.java
  26. 25 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/ActionApplication.java
  27. 17 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/CalendarJaxrsCipherFilter.java
  28. 19 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/CalendarJaxrsFilter.java
  29. 15 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/MessageJaxrsFilter.java
  30. 15 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/TestJaxrsFilter.java
  31. 67 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionDelete.java
  32. 80 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionFollowCalendar.java
  33. 56 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionFollowCalendarCancel.java
  34. 115 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionGet.java
  35. 57 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionIsCalendarManager.java
  36. 36 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionIsManager.java
  37. 130 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionListPublicCalendar.java
  38. 206 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionListWhatICanView.java
  39. 190 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionListWithCondition.java
  40. 143 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionSave.java
  41. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/BaseAction.java
  42. 281 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/CalendarAction.java
  43. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ExceptionCalendarIdEmpty.java
  44. 16 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ExceptionCalendarInfoProcess.java
  45. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ExceptionCalendarNameEmpty.java
  46. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ExceptionCalendarNotExists.java
  47. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ExceptionCalendarPropertyEmpty.java
  48. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ExceptionCalendarTargetInvalid.java
  49. 154 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionCreate.java
  50. 157 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionDestroyAfterEventId.java
  51. 115 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionDestroySingleEventWithId.java
  52. 116 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionDestroyWithMaster.java
  53. 124 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionGet.java
  54. 67 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionGetRFCContent.java
  55. 342 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionListWithCondition.java
  56. 307 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionMessageReceive.java
  57. 221 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionSimpleListWithCondition.java
  58. 197 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionUpdateAfterEventId.java
  59. 179 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionUpdateSingleEventWithId.java
  60. 198 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionUpdateWithMaster.java
  61. 197 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/BaseAction.java
  62. 318 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/Calendar_EventAction.java
  63. 50 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/Calendar_EventMessageAction.java
  64. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionCalendarNotExists.java
  65. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionCalendarPropertyEmpty.java
  66. 16 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionEventAlarmConfigError.java
  67. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionEventIsNotRecurrenceEvent.java
  68. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionEventNotExists.java
  69. 16 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionEventProcess.java
  70. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionEventPropertyEmpty.java
  71. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionEventRRuleInvalid.java
  72. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionEventRepeatMasterNotExists.java
  73. 16 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionInsufficientPermissions.java
  74. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionMessageProcess.java
  75. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionTaskEventCanNotRecurrence.java
  76. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionTaskEventCanNotRepeatMaster.java
  77. 72 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ActionGet.java
  78. 71 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ActionGetWithCode.java
  79. 34 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ActionIsManager.java
  80. 68 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ActionListAll.java
  81. 104 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ActionSave.java
  82. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/BaseAction.java
  83. 158 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/CalendarSettingAction.java
  84. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ExceptionSettingCodeEmpty.java
  85. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ExceptionSettingIdEmpty.java
  86. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ExceptionSettingInfoProcess.java
  87. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ExceptionSettingNameEmpty.java
  88. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ExceptionSettingNotExists.java
  89. 30 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/test/ActionTest1.java
  90. 12 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/test/BaseAction.java
  91. 45 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/test/TestAction.java
  92. 76 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/schedule/AlarmTrigger.java
  93. 103 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/schedule/CheckEventComment.java
  94. 274 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/service/CalendarService.java
  95. 270 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/service/CalendarServiceAdv.java
  96. 92 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/service/Calendar_EventCommentQueryService.java
  97. 66 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/service/Calendar_EventCommentService.java
  98. 230 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/service/Calendar_EventRepeatMasterService.java
  99. 137 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/service/Calendar_EventRepeatMasterServiceAdv.java
  100. 333 0
      o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/service/Calendar_EventService.java

+ 3 - 2
.gitignore

@@ -25,7 +25,8 @@
 /o2web/ftpconfig.js
 **/.DS_Store
 .DS_Store
-**/.idea/
+**/.idea
+/.idea/
 # Windows thumbnail cache files
 Thumbs.db
 Thumbs.db:encryptable
@@ -150,4 +151,4 @@ typings/
 #vscode
 **/.factorypath
 **/.vscode/
-*.swp
+*.swp

+ 1 - 1
README.md

@@ -92,7 +92,7 @@ AIX : http://download.o2oa.net/download/o2server_20200316073520_aix.zip
 
 银河麒麟(飞腾):http://download.o2oa.net/download/o2server_20200316073520_kylinos_phytium.zip
 
-raspberrypi(树莓派):http://download.o2oa.net/download/o2server_20200316073520_raspberrypi.zip
+raspberrypi(树莓派):http://download.o2oa.net/download/o2server_20200316073520_raspberrypi.zip
 
 
 

+ 1 - 1
gulpfile.js

@@ -128,7 +128,7 @@ function downloadFile(path, filename, headcb, progresscb, cb){
                     });
                     request.get(options).pipe(str).pipe(stream);
                 } else {
-                    gutil.log(gutil.colors.red("download error"), ":", gutil.colors.red(filename), "statusCode:"+res.statusCode);
+                    gutil.log(gutil.colors.red("download error"), ":", gutil.colors.red(filename), "statusCode:"+response.statusCode);
                 }
             })
             req.on('error', (e) => {

+ 4 - 0
o2server/version.o2

@@ -0,0 +1,4 @@
+{
+  "version": "4.0.5",
+  "date": "2020-03-26 11:11:50"
+}

+ 113 - 125
o2server/x_base_core_project/src/main/java/com/x/base/core/container/EntityManagerContainer.java

@@ -83,70 +83,70 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 			// Object object = jpa.get(field.getName());
 			Object object = FieldUtils.readField(field, jpa, true);
 			switch (fieldType) {
-				case stringValue:
-					this.persistChecker.stringValue.check(field, null == object ? null : Objects.toString(object), jpa,
-							checkPersist, checkPersistType);
-					break;
-				case stringValueList:
-					this.persistChecker.stringValueList.check(field, null == object ? null : (List<String>) object, jpa,
-							checkPersist, checkPersistType);
-					break;
-				case dateValue:
-					this.persistChecker.dateValue.check(field, (null == object ? null : (Date) object), jpa,
-							checkPersist, checkPersistType);
-					break;
-				case dateValueList:
-					this.persistChecker.dateValueList.check(field, (null == object ? null : (List<Date>) object), jpa,
-							checkPersist, checkPersistType);
-					break;
-				case booleanValue:
-					this.persistChecker.booleanValue.check(field, (null == object ? null : (Boolean) object), jpa,
-							checkPersist, checkPersistType);
-					break;
-				case booleanValueList:
-					this.persistChecker.booleanValueList.check(field, (null == object ? null : (List<Boolean>) object),
-							jpa, checkPersist, checkPersistType);
-					break;
-				case integerValue:
-					this.persistChecker.integerValue.check(field, (null == object ? null : (Integer) object), jpa,
-							checkPersist, checkPersistType);
-					break;
-				case integerValueList:
-					this.persistChecker.integerValueList.check(field, (null == object ? null : (List<Integer>) object),
-							jpa, checkPersist, checkPersistType);
-					break;
-				case doubleValue:
-					this.persistChecker.doubleValue.check(field, (null == object ? null : (Double) object), jpa,
-							checkPersist, checkPersistType);
-					break;
-				case doubleValueList:
-					this.persistChecker.doubleValueList.check(field, (null == object ? null : (List<Double>) object),
-							jpa, checkPersist, checkPersistType);
-					break;
-				case longValue:
-					this.persistChecker.longValue.check(field, (null == object ? null : (Long) object), jpa,
-							checkPersist, checkPersistType);
-					break;
-				case longValueList:
-					this.persistChecker.longValueList.check(field, (null == object ? null : (List<Long>) object), jpa,
-							checkPersist, checkPersistType);
-					break;
-				case floatValue:
-					this.persistChecker.floatValue.check(field, (null == object ? null : (Float) object), jpa,
-							checkPersist, checkPersistType);
-					break;
-				case floatValueList:
-					this.persistChecker.floatValueList.check(field, (null == object ? null : (List<Float>) object), jpa,
-							checkPersist, checkPersistType);
-					break;
-				case byteValueArray:
-					this.persistChecker.byteValueArray.check(field, (null == object ? null : (byte[]) object), jpa,
-							checkPersist, checkPersistType);
-					break;
-				case enumValue:
-					break;
-				default:
-					break;
+			case stringValue:
+				this.persistChecker.stringValue.check(field, null == object ? null : Objects.toString(object), jpa,
+						checkPersist, checkPersistType);
+				break;
+			case stringValueList:
+				this.persistChecker.stringValueList.check(field, null == object ? null : (List<String>) object, jpa,
+						checkPersist, checkPersistType);
+				break;
+			case dateValue:
+				this.persistChecker.dateValue.check(field, (null == object ? null : (Date) object), jpa, checkPersist,
+						checkPersistType);
+				break;
+			case dateValueList:
+				this.persistChecker.dateValueList.check(field, (null == object ? null : (List<Date>) object), jpa,
+						checkPersist, checkPersistType);
+				break;
+			case booleanValue:
+				this.persistChecker.booleanValue.check(field, (null == object ? null : (Boolean) object), jpa,
+						checkPersist, checkPersistType);
+				break;
+			case booleanValueList:
+				this.persistChecker.booleanValueList.check(field, (null == object ? null : (List<Boolean>) object), jpa,
+						checkPersist, checkPersistType);
+				break;
+			case integerValue:
+				this.persistChecker.integerValue.check(field, (null == object ? null : (Integer) object), jpa,
+						checkPersist, checkPersistType);
+				break;
+			case integerValueList:
+				this.persistChecker.integerValueList.check(field, (null == object ? null : (List<Integer>) object), jpa,
+						checkPersist, checkPersistType);
+				break;
+			case doubleValue:
+				this.persistChecker.doubleValue.check(field, (null == object ? null : (Double) object), jpa,
+						checkPersist, checkPersistType);
+				break;
+			case doubleValueList:
+				this.persistChecker.doubleValueList.check(field, (null == object ? null : (List<Double>) object), jpa,
+						checkPersist, checkPersistType);
+				break;
+			case longValue:
+				this.persistChecker.longValue.check(field, (null == object ? null : (Long) object), jpa, checkPersist,
+						checkPersistType);
+				break;
+			case longValueList:
+				this.persistChecker.longValueList.check(field, (null == object ? null : (List<Long>) object), jpa,
+						checkPersist, checkPersistType);
+				break;
+			case floatValue:
+				this.persistChecker.floatValue.check(field, (null == object ? null : (Float) object), jpa, checkPersist,
+						checkPersistType);
+				break;
+			case floatValueList:
+				this.persistChecker.floatValueList.check(field, (null == object ? null : (List<Float>) object), jpa,
+						checkPersist, checkPersistType);
+				break;
+			case byteValueArray:
+				this.persistChecker.byteValueArray.check(field, (null == object ? null : (byte[]) object), jpa,
+						checkPersist, checkPersistType);
+				break;
+			case enumValue:
+				break;
+			default:
+				break;
 			}
 		}
 	}
@@ -161,16 +161,16 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 			// Object object = jpa.get(field.getName());
 			Object object = FieldUtils.readField(field, jpa, true);
 			switch (fieldType) {
-				case stringValue:
-					this.removeChecker.stringValue.check(field, null == object ? null : Objects.toString(object), jpa,
-							checkRemove, checkRemoveType);
-					break;
-				case stringValueList:
-					this.removeChecker.stringValueList.check(field, null == object ? null : (List<String>) object, jpa,
-							checkRemove, checkRemoveType);
-					break;
-				default:
-					break;
+			case stringValue:
+				this.removeChecker.stringValue.check(field, null == object ? null : Objects.toString(object), jpa,
+						checkRemove, checkRemoveType);
+				break;
+			case stringValueList:
+				this.removeChecker.stringValueList.check(field, null == object ? null : (List<String>) object, jpa,
+						checkRemove, checkRemoveType);
+				break;
+			default:
+				break;
 			}
 		}
 	}
@@ -208,19 +208,18 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 			t = em.find(cls, id);
 		}
 		switch (exceptionWhen) {
-			case not_found:
-				if (null == t) {
-					throw new Exception("can not find entity id: " + id + ", class: " + cls.getCanonicalName() + ".");
-				}
-				break;
-			case found:
-				if (null != t) {
-					throw new Exception(
-							"entity already existed, id: " + id + ", class: " + cls.getCanonicalName() + ".");
-				}
-				break;
-			default:
-				break;
+		case not_found:
+			if (null == t) {
+				throw new Exception("can not find entity id: " + id + ", class: " + cls.getCanonicalName() + ".");
+			}
+			break;
+		case found:
+			if (null != t) {
+				throw new Exception("entity already existed, id: " + id + ", class: " + cls.getCanonicalName() + ".");
+			}
+			break;
+		default:
+			break;
 		}
 		return t;
 	}
@@ -245,14 +244,14 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 			Predicate p = cb.equal(root.get(field.getName()), flag);
 			List<T> list = em.createQuery(cq.select(root).where(p).distinct(true)).setMaxResults(2).getResultList();
 			switch (list.size()) {
-				case 0:
-					break;
-				case 1:
-					t = list.get(0);
-					break out;
-				case 2:
-					throw new Exception("flag get multiple entity flag:" + flag + ", class:" + cls.getName()
-							+ ", attribute:" + field.getName() + ".");
+			case 0:
+				break;
+			case 1:
+				t = list.get(0);
+				break out;
+			case 2:
+				throw new Exception("flag get multiple entity flag:" + flag + ", class:" + cls.getName()
+						+ ", attribute:" + field.getName() + ".");
 			}
 		}
 		return t;
@@ -310,15 +309,15 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 			cq.select(root).where(p);
 			List<T> list = em.createQuery(cq).setMaxResults(2).getResultList();
 			switch (list.size()) {
-				case 0:
-					break;
-				case 1:
-					t = list.get(0);
-					break out;
-				case 2:
-					throw new Exception("flag get multiple entity flag:" + flag + ", class:" + cls.getName()
-							+ ", attribute:" + field.getName() + ", restrict attrubte:" + singularAttribute
-							+ ", restrict value:" + restrictValue + ".");
+			case 0:
+				break;
+			case 1:
+				t = list.get(0);
+				break out;
+			case 2:
+				throw new Exception("flag get multiple entity flag:" + flag + ", class:" + cls.getName()
+						+ ", attribute:" + field.getName() + ", restrict attrubte:" + singularAttribute
+						+ ", restrict value:" + restrictValue + ".");
 			}
 		}
 		return t;
@@ -541,25 +540,13 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 
 	public <T extends JpaObject, W extends Object> List<T> listBetweenAndEqual(Class<T> cls, String attribute,
 			Object start, Object end, String equalAttribute, Object equalValue) throws Exception {
-		Comparable s = (Comparable) start;
-		Comparable e = (Comparable) end;
 		EntityManager em = this.get(cls);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<T> cq = cb.createQuery(cls);
-		Root<T> root = cq.from(cls);
-		Predicate p = cb.between(root.get(attribute), s, e);
-		p = cb.and(p, cb.equal(root.get(equalAttribute), equalValue));
-		cq.select(root).where(p);
-		List<T> os = em.createQuery(cq).getResultList();
-		List<T> list = new ArrayList<>(os);
-		return list;
-		// Query query = em.createQuery("select o from " + cls.getName() + " o where
-		// ((o." + attribute
-		// + " between ?1 and ?2) and (o." + equalAttribute + " = ?3))");
-		// query.setParameter(1, start);
-		// query.setParameter(2, end);
-		// query.setParameter(3, equalValue);
-		// return new ArrayList<T>(query.getResultList());
+		Query query = em.createQuery("select o from " + cls.getName() + " o where ((o." + attribute
+				+ " between ?1 and ?2) and (o." + equalAttribute + " = ?3))");
+		query.setParameter(1, start);
+		query.setParameter(2, end);
+		query.setParameter(3, equalValue);
+		return new ArrayList<T>(query.getResultList());
 	}
 
 	public <T extends JpaObject> List<T> listNotEqual(Class<T> cls, String attribute, Object value) throws Exception {
@@ -1138,9 +1125,9 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 			selections.add(root.get(str));
 		}
 		cq.multiselect(selections).where(predicate);
-		// if (StringUtils.isNotEmpty(orderAttribute)) {
-		// cq.orderBy(cb.desc(root.get(orderAttribute)));
-		// }
+//		if (StringUtils.isNotEmpty(orderAttribute)) {
+//			cq.orderBy(cb.desc(root.get(orderAttribute)));
+//		}
 		T t = null;
 		for (Tuple o : em.createQuery(cq).getResultList()) {
 			t = clz.newInstance();
@@ -1836,4 +1823,5 @@ public class EntityManagerContainer extends EntityManagerContainerBasic {
 		return list;
 	}
 
+
 }

+ 3 - 3
o2server/x_base_core_project/src/main/java/com/x/base/core/project/build/CreateVersionFile.java → o2server/x_base_core_project/src/main/java/com/x/base/core/project/build/CreateVersion.java

@@ -13,11 +13,11 @@ import org.apache.commons.io.FileUtils;
 import org.apache.maven.model.Model;
 import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
 
-public class CreateVersionFile {
+public class CreateVersion {
 	public static void main(String... args) throws Exception {
 		File base = new File(args[0]);
-		File file = new File(base, "../version.o2");
-		File pom = new File(base, "../pom.xml");
+		File file = new File(base, "version.o2");
+		File pom = new File(base, "pom.xml");
 
 		MavenXpp3Reader reader = new MavenXpp3Reader();
 		Model model = reader.read(new FileReader(pom));

+ 45 - 44
o2server/x_base_core_project/src/main/java/com/x/base/core/project/build/PackageO2server.java

@@ -29,50 +29,51 @@ public class PackageO2server {
 		createO2Version(base.getAbsolutePath());
 		CreateConfigSample.main(base.getAbsolutePath());
 		CreateLocalSample.main(base.getAbsolutePath());
-		File file = new File(base, "o2server.zip");
-		FileUtils.forceMkdir(new File(base.getAbsolutePath(), "servers"));
-		try (ZipOutputStream outputStream = new ZipOutputStream(new FileOutputStream(file))) {
-			compress(outputStream, base.getAbsolutePath(), "configSample");
-			compress(outputStream, base.getAbsolutePath(), "jvm");
-			compress(outputStream, base.getAbsolutePath(), "commons");
-			compress(outputStream, base.getAbsolutePath(), "store");
-			compress(outputStream, base.getAbsolutePath(), "localSample");
-			compress(outputStream, base.getAbsolutePath(), "servers");
-			compress(outputStream, base.getAbsolutePath(), "console.jar");
-			compress(outputStream, base.getAbsolutePath(), "index.html");
-			compress(outputStream, base.getAbsolutePath(), "service_windows.bat");
-			compress(outputStream, base.getAbsolutePath(), "start_windows.bat");
-			compress(outputStream, base.getAbsolutePath(), "start_windows_debug.bat");
-			compress(outputStream, base.getAbsolutePath(), "stop_windows.bat");
-			compress(outputStream, base.getAbsolutePath(), "console_windows.bat");
-			compress(outputStream, base.getAbsolutePath(), "start_linux.sh");
-			compress(outputStream, base.getAbsolutePath(), "start_linux_debug.sh");
-			compress(outputStream, base.getAbsolutePath(), "stop_linux.sh");
-			compress(outputStream, base.getAbsolutePath(), "console_linux.sh");
-			compress(outputStream, base.getAbsolutePath(), "start_macos.sh");
-			compress(outputStream, base.getAbsolutePath(), "start_macos_debug.sh");
-			compress(outputStream, base.getAbsolutePath(), "stop_macos.sh");
-			compress(outputStream, base.getAbsolutePath(), "console_macos.sh");
-			compress(outputStream, base.getAbsolutePath(), "start_aix.sh");
-			compress(outputStream, base.getAbsolutePath(), "start_aix_debug.sh");
-			compress(outputStream, base.getAbsolutePath(), "stop_aix.sh");
-			compress(outputStream, base.getAbsolutePath(), "console_aix.sh");
-			compress(outputStream, base.getAbsolutePath(), "start_raspberrypi.sh");
-			compress(outputStream, base.getAbsolutePath(), "start_raspberrypi_debug.sh");
-			compress(outputStream, base.getAbsolutePath(), "stop_raspberrypi.sh");
-			compress(outputStream, base.getAbsolutePath(), "console_raspberrypi.sh");
-			compress(outputStream, base.getAbsolutePath(), "start_neokylin_loongson.sh");
-			compress(outputStream, base.getAbsolutePath(), "start_neokylin_loongson_debug.sh");
-			compress(outputStream, base.getAbsolutePath(), "stop_neokylin_loongson.sh");
-			compress(outputStream, base.getAbsolutePath(), "console_neokylin_loongson.sh");
-			compress(outputStream, base.getAbsolutePath(), "start_kylinos_phytium.sh");
-			compress(outputStream, base.getAbsolutePath(), "start_kylinos_phytium_debug.sh");
-			compress(outputStream, base.getAbsolutePath(), "stop_kylinos_phytium.sh");
-			compress(outputStream, base.getAbsolutePath(), "console_kylinos_phytium.sh");
-			compress(outputStream, base.getAbsolutePath(), "version.o2");
-		} catch (IOException e) {
-			e.printStackTrace();
-		}
+		CreateVersion.main(base.getAbsolutePath());
+		// File file = new File(base, "o2server.zip");
+		// FileUtils.forceMkdir(new File(base.getAbsolutePath(), "servers"));
+		// try (ZipOutputStream outputStream = new ZipOutputStream(new FileOutputStream(file))) {
+		// 	compress(outputStream, base.getAbsolutePath(), "configSample");
+		// 	compress(outputStream, base.getAbsolutePath(), "jvm");
+		// 	compress(outputStream, base.getAbsolutePath(), "commons");
+		// 	compress(outputStream, base.getAbsolutePath(), "store");
+		// 	compress(outputStream, base.getAbsolutePath(), "localSample");
+		// 	compress(outputStream, base.getAbsolutePath(), "servers");
+		// 	compress(outputStream, base.getAbsolutePath(), "console.jar");
+		// 	compress(outputStream, base.getAbsolutePath(), "index.html");
+		// 	compress(outputStream, base.getAbsolutePath(), "service_windows.bat");
+		// 	compress(outputStream, base.getAbsolutePath(), "start_windows.bat");
+		// 	compress(outputStream, base.getAbsolutePath(), "start_windows_debug.bat");
+		// 	compress(outputStream, base.getAbsolutePath(), "stop_windows.bat");
+		// 	compress(outputStream, base.getAbsolutePath(), "console_windows.bat");
+		// 	compress(outputStream, base.getAbsolutePath(), "start_linux.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "start_linux_debug.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "stop_linux.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "console_linux.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "start_macos.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "start_macos_debug.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "stop_macos.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "console_macos.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "start_aix.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "start_aix_debug.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "stop_aix.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "console_aix.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "start_raspberrypi.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "start_raspberrypi_debug.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "stop_raspberrypi.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "console_raspberrypi.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "start_neokylin_loongson.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "start_neokylin_loongson_debug.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "stop_neokylin_loongson.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "console_neokylin_loongson.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "start_kylinos_phytium.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "start_kylinos_phytium_debug.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "stop_kylinos_phytium.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "console_kylinos_phytium.sh");
+		// 	compress(outputStream, base.getAbsolutePath(), "version.o2");
+		// } catch (IOException e) {
+		// 	e.printStackTrace();
+		// }
 	}
 
 	public static void compress(ZipOutputStream outputStream, String base, String path) throws Exception {

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

@@ -2,7 +2,6 @@ package com.x.base.core.project.executor;
 
 import java.util.Objects;
 import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
 import java.util.zip.CRC32;
 
 import com.x.base.core.project.config.Config;
@@ -41,7 +40,7 @@ public class ProcessPlatformExecutorFactory {
 		}
 		CRC32 crc32 = new CRC32();
 		crc32.update(Objects.toString(seed, "").getBytes());
-		int idx = (int) (crc32.getValue() % executors.length);
+		int idx = (int) (Math.abs(crc32.getValue()) % executors.length);
 		return executors[idx];
 	}
 

+ 1 - 0
o2server/x_bbs_assemble_control/src/main/java/com/x/bbs/assemble/control/jaxrs/configsetting/BBSConfigSettingAnonymousAction.java

@@ -9,6 +9,7 @@ import javax.ws.rs.container.AsyncResponse;
 import javax.ws.rs.container.Suspended;
 import javax.ws.rs.core.Context;
 import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
 
 import com.x.base.core.project.annotation.JaxrsDescribe;
 import com.x.base.core.project.annotation.JaxrsMethodDescribe;

+ 3983 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/describe.json

@@ -0,0 +1,3983 @@
+{
+  "jaxrs": [
+    {
+      "name": "CacheAction",
+      "className": "com.x.base.core.project.jaxrs.cache.CacheAction",
+      "description": "缓存操作",
+      "methods": [
+        {
+          "name": "configFlush",
+          "className": "com.x.base.core.project.jaxrs.cache.ActionConfigFlush",
+          "description": "接收config flush 信号.",
+          "type": "GET",
+          "path": "jaxrs/cache/config/flush",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "value",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "布尔值."
+            }
+          ]
+        },
+        {
+          "name": "receive",
+          "className": "com.x.base.core.project.jaxrs.cache.ActionReceive",
+          "description": "接收Cache刷新信息.",
+          "type": "PUT",
+          "path": "jaxrs/cache",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [
+            {
+              "name": "nodeName",
+              "type": "String",
+              "isCollection": false,
+              "description": "节点名",
+              "isBaseType": true
+            },
+            {
+              "name": "className",
+              "type": "String",
+              "isCollection": false,
+              "description": "类名",
+              "isBaseType": true
+            },
+            {
+              "name": "keys",
+              "type": "List\u003cObject\u003e",
+              "isCollection": true,
+              "description": "关键字",
+              "isBaseType": false
+            }
+          ],
+          "outs": [
+            {
+              "name": "value",
+              "type": "String",
+              "isCollection": false,
+              "description": "字符串值"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "name": "CalendarAction",
+      "className": "com.x.calendar.assemble.control.jaxrs.calendar.CalendarAction",
+      "description": "日历信息管理服务",
+      "methods": [
+        {
+          "name": "destory",
+          "className": "com.x.calendar.assemble.control.jaxrs.calendar.ActionDelete",
+          "description": "根据ID删除日历信息及所有事件",
+          "type": "DELETE",
+          "path": "jaxrs/calendar/{id}",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "id",
+              "type": "String",
+              "description": "日历信息ID"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "id"
+            }
+          ]
+        },
+        {
+          "name": "followCalendar",
+          "className": "com.x.calendar.assemble.control.jaxrs.calendar.ActionFollowCalendar",
+          "description": "关注一个公开的日历信息",
+          "type": "GET",
+          "path": "jaxrs/calendar/follow/{id}",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "id",
+              "type": "String",
+              "description": "日历信息ID"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": []
+        },
+        {
+          "name": "followCalendarCancel",
+          "className": "com.x.calendar.assemble.control.jaxrs.calendar.ActionFollowCalendarCancel",
+          "description": "取消关注一个公开的日历信息",
+          "type": "GET",
+          "path": "jaxrs/calendar/follow/{id}/cancel",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "id",
+              "type": "String",
+              "description": "日历信息ID"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": []
+        },
+        {
+          "name": "get",
+          "className": "com.x.calendar.assemble.control.jaxrs.calendar.ActionGet",
+          "description": "根据ID获取日历信息",
+          "type": "GET",
+          "path": "jaxrs/calendar/{id}",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "id",
+              "type": "String",
+              "description": "日历信息ID"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "manageable",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "用户是否可以对该日历进行管理."
+            },
+            {
+              "name": "publishable",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "用户是否可以在该日历中发布日程事件."
+            },
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "数据库主键,自动生成."
+            },
+            {
+              "name": "name",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历名称"
+            },
+            {
+              "name": "type",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历类别: PERSON | UNIT"
+            },
+            {
+              "name": "target",
+              "type": "String",
+              "isCollection": false,
+              "description": "人员标识或者组织标识"
+            },
+            {
+              "name": "color",
+              "type": "String",
+              "isCollection": false,
+              "description": "显示颜色"
+            },
+            {
+              "name": "description",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注70个字"
+            },
+            {
+              "name": "source",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息来源: LEADER | PERSON | UNIT | MEETING | BUSINESS_TRIP | HOLIDAY"
+            },
+            {
+              "name": "createor",
+              "type": "String",
+              "isCollection": false,
+              "description": "创建者"
+            },
+            {
+              "name": "isPublic",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否公开的日历"
+            },
+            {
+              "name": "manageablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可管理人员列表"
+            },
+            {
+              "name": "followers",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "关注者列表"
+            },
+            {
+              "name": "viewablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见人员列表"
+            },
+            {
+              "name": "viewableUnitList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见组织列表"
+            },
+            {
+              "name": "viewableGroupList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见群组列表"
+            },
+            {
+              "name": "publishablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可发布人员列表"
+            },
+            {
+              "name": "publishableUnitList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可发布组织列表"
+            },
+            {
+              "name": "publishableGroupList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可发布群组列表"
+            },
+            {
+              "name": "status",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历状态:OPEN|CLOSE"
+            },
+            {
+              "name": "distributeFactor",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "分布式存储标识位."
+            },
+            {
+              "name": "createTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "创建时间,自动生成,索引创建在约束中."
+            },
+            {
+              "name": "updateTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "修改时间,自动生成,索引创建在约束中."
+            },
+            {
+              "name": "sequence",
+              "type": "String",
+              "isCollection": false,
+              "description": "列表序号,由创建时间以及ID组成.在保存时自动生成,索引创建在约束中."
+            }
+          ]
+        },
+        {
+          "name": "isCalendarManager",
+          "className": "com.x.calendar.assemble.control.jaxrs.calendar.ActionIsCalendarManager",
+          "description": "判断当前用户是否对指定的日历有管理员权限",
+          "type": "GET",
+          "path": "jaxrs/calendar/ismanager/calendar/{accountId}",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": []
+        },
+        {
+          "name": "isManager",
+          "className": "com.x.calendar.assemble.control.jaxrs.calendar.ActionIsManager",
+          "description": "判断当前用户是否有管理员权限",
+          "type": "GET",
+          "path": "jaxrs/calendar/ismanager",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": []
+        },
+        {
+          "name": "listMyCalendar",
+          "className": "com.x.calendar.assemble.control.jaxrs.calendar.ActionListWhatICanView",
+          "description": "获取我能访问到的所有日历信息列表",
+          "type": "GET",
+          "path": "jaxrs/calendar/list/my",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "myCalendars",
+              "type": "List\u003cWoCalendar\u003e",
+              "isCollection": true,
+              "description": "我创建的个人日历列表."
+            },
+            {
+              "name": "unitCalendars",
+              "type": "List\u003cWoCalendar\u003e",
+              "isCollection": true,
+              "description": "可见的组织日历列表."
+            },
+            {
+              "name": "followCalendars",
+              "type": "List\u003cWoCalendar\u003e",
+              "isCollection": true,
+              "description": "关注的日历列表."
+            }
+          ]
+        },
+        {
+          "name": "listPublicCalendar",
+          "className": "com.x.calendar.assemble.control.jaxrs.calendar.ActionListPublicCalendar",
+          "description": "获取所有公开的日历信息列表",
+          "type": "GET",
+          "path": "jaxrs/calendar/list/public",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "manageable",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "用户是否可以对该日历进行管理."
+            },
+            {
+              "name": "publishable",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "用户是否可以在该日历中发布日程事件."
+            },
+            {
+              "name": "followed",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "用户是否已经关注."
+            },
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "数据库主键,自动生成."
+            },
+            {
+              "name": "name",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历名称"
+            },
+            {
+              "name": "type",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历类别: PERSON | UNIT"
+            },
+            {
+              "name": "target",
+              "type": "String",
+              "isCollection": false,
+              "description": "人员标识或者组织标识"
+            },
+            {
+              "name": "color",
+              "type": "String",
+              "isCollection": false,
+              "description": "显示颜色"
+            },
+            {
+              "name": "description",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注70个字"
+            },
+            {
+              "name": "source",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息来源: LEADER | PERSON | UNIT | MEETING | BUSINESS_TRIP | HOLIDAY"
+            },
+            {
+              "name": "createor",
+              "type": "String",
+              "isCollection": false,
+              "description": "创建者"
+            },
+            {
+              "name": "isPublic",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否公开的日历"
+            },
+            {
+              "name": "manageablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可管理人员列表"
+            },
+            {
+              "name": "followers",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "关注者列表"
+            },
+            {
+              "name": "viewablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见人员列表"
+            },
+            {
+              "name": "viewableUnitList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见组织列表"
+            },
+            {
+              "name": "viewableGroupList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见群组列表"
+            },
+            {
+              "name": "publishablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可发布人员列表"
+            },
+            {
+              "name": "publishableUnitList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可发布组织列表"
+            },
+            {
+              "name": "publishableGroupList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可发布群组列表"
+            },
+            {
+              "name": "status",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历状态:OPEN|CLOSE"
+            },
+            {
+              "name": "distributeFactor",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "分布式存储标识位."
+            },
+            {
+              "name": "createTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "创建时间,自动生成,索引创建在约束中."
+            },
+            {
+              "name": "updateTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "修改时间,自动生成,索引创建在约束中."
+            },
+            {
+              "name": "sequence",
+              "type": "String",
+              "isCollection": false,
+              "description": "列表序号,由创建时间以及ID组成.在保存时自动生成,索引创建在约束中."
+            }
+          ]
+        },
+        {
+          "name": "listWithFilter",
+          "className": "com.x.calendar.assemble.control.jaxrs.calendar.ActionListWithCondition",
+          "description": "根据条件查询日历信息列表",
+          "type": "PUT",
+          "path": "jaxrs/calendar/list/filter",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [
+            {
+              "name": "name",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历名称",
+              "isBaseType": true
+            },
+            {
+              "name": "type",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历类型",
+              "isBaseType": true
+            },
+            {
+              "name": "source",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历来源",
+              "isBaseType": true
+            },
+            {
+              "name": "createor",
+              "type": "String",
+              "isCollection": false,
+              "description": "创建者",
+              "isBaseType": true
+            }
+          ],
+          "outs": [
+            {
+              "name": "manageable",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "用户是否可以对该日历进行管理."
+            },
+            {
+              "name": "publishable",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "用户是否可以在该日历中发布日程事件."
+            },
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "数据库主键,自动生成."
+            },
+            {
+              "name": "name",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历名称"
+            },
+            {
+              "name": "type",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历类别: PERSON | UNIT"
+            },
+            {
+              "name": "target",
+              "type": "String",
+              "isCollection": false,
+              "description": "人员标识或者组织标识"
+            },
+            {
+              "name": "color",
+              "type": "String",
+              "isCollection": false,
+              "description": "显示颜色"
+            },
+            {
+              "name": "description",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注70个字"
+            },
+            {
+              "name": "source",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息来源: LEADER | PERSON | UNIT | MEETING | BUSINESS_TRIP | HOLIDAY"
+            },
+            {
+              "name": "createor",
+              "type": "String",
+              "isCollection": false,
+              "description": "创建者"
+            },
+            {
+              "name": "isPublic",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否公开的日历"
+            },
+            {
+              "name": "manageablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可管理人员列表"
+            },
+            {
+              "name": "followers",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "关注者列表"
+            },
+            {
+              "name": "viewablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见人员列表"
+            },
+            {
+              "name": "viewableUnitList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见组织列表"
+            },
+            {
+              "name": "viewableGroupList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见群组列表"
+            },
+            {
+              "name": "publishablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可发布人员列表"
+            },
+            {
+              "name": "publishableUnitList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可发布组织列表"
+            },
+            {
+              "name": "publishableGroupList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可发布群组列表"
+            },
+            {
+              "name": "status",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历状态:OPEN|CLOSE"
+            },
+            {
+              "name": "distributeFactor",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "分布式存储标识位."
+            },
+            {
+              "name": "createTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "创建时间,自动生成,索引创建在约束中."
+            },
+            {
+              "name": "updateTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "修改时间,自动生成,索引创建在约束中."
+            },
+            {
+              "name": "sequence",
+              "type": "String",
+              "isCollection": false,
+              "description": "列表序号,由创建时间以及ID组成.在保存时自动生成,索引创建在约束中."
+            }
+          ]
+        },
+        {
+          "name": "save",
+          "className": "com.x.calendar.assemble.control.jaxrs.calendar.ActionSave",
+          "description": "新建或者更新日历信息",
+          "type": "POST",
+          "path": "jaxrs/calendar",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [
+            {
+              "name": "name",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历名称",
+              "isBaseType": true
+            },
+            {
+              "name": "type",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历类别: PERSON | UNIT",
+              "isBaseType": true
+            },
+            {
+              "name": "target",
+              "type": "String",
+              "isCollection": false,
+              "description": "人员标识或者组织标识",
+              "isBaseType": true
+            },
+            {
+              "name": "color",
+              "type": "String",
+              "isCollection": false,
+              "description": "显示颜色",
+              "isBaseType": true
+            },
+            {
+              "name": "description",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注70个字",
+              "isBaseType": true
+            },
+            {
+              "name": "source",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息来源: LEADER | PERSON | UNIT | MEETING | BUSINESS_TRIP | HOLIDAY",
+              "isBaseType": true
+            },
+            {
+              "name": "createor",
+              "type": "String",
+              "isCollection": false,
+              "description": "创建者",
+              "isBaseType": true
+            },
+            {
+              "name": "isPublic",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否公开的日历",
+              "isBaseType": true
+            },
+            {
+              "name": "manageablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可管理人员列表",
+              "isBaseType": true
+            },
+            {
+              "name": "followers",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "关注者列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见人员列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewableUnitList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见组织列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewableGroupList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见群组列表",
+              "isBaseType": true
+            },
+            {
+              "name": "publishablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可发布人员列表",
+              "isBaseType": true
+            },
+            {
+              "name": "publishableUnitList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可发布组织列表",
+              "isBaseType": true
+            },
+            {
+              "name": "publishableGroupList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可发布群组列表",
+              "isBaseType": true
+            },
+            {
+              "name": "status",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历状态:OPEN|CLOSE",
+              "isBaseType": true
+            }
+          ],
+          "outs": [
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "id"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "name": "CalendarSettingAction",
+      "className": "com.x.calendar.assemble.control.jaxrs.setting.CalendarSettingAction",
+      "description": "系统设置信息管理服务",
+      "methods": [
+        {
+          "name": "get",
+          "className": "com.x.calendar.assemble.control.jaxrs.setting.ActionGet",
+          "description": "根据ID获取系统配置信息",
+          "type": "GET",
+          "path": "jaxrs/setting/{id}",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "id",
+              "type": "String",
+              "description": "系统配置信息ID"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "数据库主键,自动生成."
+            },
+            {
+              "name": "configCode",
+              "type": "String",
+              "isCollection": false,
+              "description": "配置编码"
+            },
+            {
+              "name": "configName",
+              "type": "String",
+              "isCollection": false,
+              "description": "配置名称"
+            },
+            {
+              "name": "configValue",
+              "type": "String",
+              "isCollection": false,
+              "description": "配置内容"
+            },
+            {
+              "name": "valueType",
+              "type": "String",
+              "isCollection": false,
+              "description": "值类型: select | identity | number | date | text"
+            },
+            {
+              "name": "selectContent",
+              "type": "String",
+              "isCollection": false,
+              "description": "可选值,和select配合使用,以‘|’号分隔"
+            },
+            {
+              "name": "isMultiple",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否可以多值"
+            },
+            {
+              "name": "isLob",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否富文本、长文本"
+            },
+            {
+              "name": "orderNumber",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "排序号"
+            },
+            {
+              "name": "description",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注说明"
+            },
+            {
+              "name": "distributeFactor",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "分布式存储标识位."
+            },
+            {
+              "name": "createTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "创建时间,自动生成,索引创建在约束中."
+            },
+            {
+              "name": "updateTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "修改时间,自动生成,索引创建在约束中."
+            },
+            {
+              "name": "sequence",
+              "type": "String",
+              "isCollection": false,
+              "description": "列表序号,由创建时间以及ID组成.在保存时自动生成,索引创建在约束中."
+            }
+          ]
+        },
+        {
+          "name": "getWithCode",
+          "className": "com.x.calendar.assemble.control.jaxrs.setting.ActionGetWithCode",
+          "description": "根据Code获取系统配置信息",
+          "type": "GET",
+          "path": "jaxrs/setting/code/{code}",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "code",
+              "type": "String",
+              "description": "系统配置信息编码"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "数据库主键,自动生成."
+            },
+            {
+              "name": "configCode",
+              "type": "String",
+              "isCollection": false,
+              "description": "配置编码"
+            },
+            {
+              "name": "configName",
+              "type": "String",
+              "isCollection": false,
+              "description": "配置名称"
+            },
+            {
+              "name": "configValue",
+              "type": "String",
+              "isCollection": false,
+              "description": "配置内容"
+            },
+            {
+              "name": "valueType",
+              "type": "String",
+              "isCollection": false,
+              "description": "值类型: select | identity | number | date | text"
+            },
+            {
+              "name": "selectContent",
+              "type": "String",
+              "isCollection": false,
+              "description": "可选值,和select配合使用,以‘|’号分隔"
+            },
+            {
+              "name": "isMultiple",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否可以多值"
+            },
+            {
+              "name": "isLob",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否富文本、长文本"
+            },
+            {
+              "name": "orderNumber",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "排序号"
+            },
+            {
+              "name": "description",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注说明"
+            },
+            {
+              "name": "distributeFactor",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "分布式存储标识位."
+            },
+            {
+              "name": "createTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "创建时间,自动生成,索引创建在约束中."
+            },
+            {
+              "name": "updateTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "修改时间,自动生成,索引创建在约束中."
+            },
+            {
+              "name": "sequence",
+              "type": "String",
+              "isCollection": false,
+              "description": "列表序号,由创建时间以及ID组成.在保存时自动生成,索引创建在约束中."
+            }
+          ]
+        },
+        {
+          "name": "isManager",
+          "className": "com.x.calendar.assemble.control.jaxrs.setting.ActionIsManager",
+          "description": "判断当前用户是否有管理员权限",
+          "type": "GET",
+          "path": "jaxrs/setting/ismanager",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": []
+        },
+        {
+          "name": "listAllReportSetting",
+          "className": "com.x.calendar.assemble.control.jaxrs.setting.ActionListAll",
+          "description": "获取所有系统配置信息列表",
+          "type": "GET",
+          "path": "jaxrs/setting/list/all",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "数据库主键,自动生成."
+            },
+            {
+              "name": "configCode",
+              "type": "String",
+              "isCollection": false,
+              "description": "配置编码"
+            },
+            {
+              "name": "configName",
+              "type": "String",
+              "isCollection": false,
+              "description": "配置名称"
+            },
+            {
+              "name": "configValue",
+              "type": "String",
+              "isCollection": false,
+              "description": "配置内容"
+            },
+            {
+              "name": "valueType",
+              "type": "String",
+              "isCollection": false,
+              "description": "值类型: select | identity | number | date | text"
+            },
+            {
+              "name": "selectContent",
+              "type": "String",
+              "isCollection": false,
+              "description": "可选值,和select配合使用,以‘|’号分隔"
+            },
+            {
+              "name": "isMultiple",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否可以多值"
+            },
+            {
+              "name": "isLob",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否富文本、长文本"
+            },
+            {
+              "name": "orderNumber",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "排序号"
+            },
+            {
+              "name": "description",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注说明"
+            },
+            {
+              "name": "distributeFactor",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "分布式存储标识位."
+            },
+            {
+              "name": "createTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "创建时间,自动生成,索引创建在约束中."
+            },
+            {
+              "name": "updateTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "修改时间,自动生成,索引创建在约束中."
+            },
+            {
+              "name": "sequence",
+              "type": "String",
+              "isCollection": false,
+              "description": "列表序号,由创建时间以及ID组成.在保存时自动生成,索引创建在约束中."
+            }
+          ]
+        },
+        {
+          "name": "save",
+          "className": "com.x.calendar.assemble.control.jaxrs.setting.ActionSave",
+          "description": "新建或者更新系统配置信息",
+          "type": "POST",
+          "path": "jaxrs/setting",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [
+            {
+              "name": "configCode",
+              "type": "String",
+              "isCollection": false,
+              "description": "配置编码",
+              "isBaseType": true
+            },
+            {
+              "name": "configName",
+              "type": "String",
+              "isCollection": false,
+              "description": "配置名称",
+              "isBaseType": true
+            },
+            {
+              "name": "configValue",
+              "type": "String",
+              "isCollection": false,
+              "description": "配置内容",
+              "isBaseType": true
+            },
+            {
+              "name": "valueType",
+              "type": "String",
+              "isCollection": false,
+              "description": "值类型: select | identity | number | date | text",
+              "isBaseType": true
+            },
+            {
+              "name": "selectContent",
+              "type": "String",
+              "isCollection": false,
+              "description": "可选值,和select配合使用,以‘|’号分隔",
+              "isBaseType": true
+            },
+            {
+              "name": "isMultiple",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否可以多值",
+              "isBaseType": true
+            },
+            {
+              "name": "isLob",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否富文本、长文本",
+              "isBaseType": true
+            },
+            {
+              "name": "orderNumber",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "排序号",
+              "isBaseType": true
+            },
+            {
+              "name": "description",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注说明",
+              "isBaseType": true
+            }
+          ],
+          "outs": [
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "id"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "name": "Calendar_EventAction",
+      "className": "com.x.calendar.assemble.control.jaxrs.event.Calendar_EventAction",
+      "description": "日历事件信息管理服务",
+      "methods": [
+        {
+          "name": "create",
+          "className": "com.x.calendar.assemble.control.jaxrs.event.ActionCreate",
+          "description": "创建一个新的日历事件信息",
+          "type": "POST",
+          "path": "jaxrs/event",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "数据库主键,自动生成.",
+              "isBaseType": true
+            },
+            {
+              "name": "calendarId",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历账号ID",
+              "isBaseType": true
+            },
+            {
+              "name": "repeatMasterId",
+              "type": "String",
+              "isCollection": false,
+              "description": "重复日程宿主ID",
+              "isBaseType": true
+            },
+            {
+              "name": "eventType",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息类别: CAL_EVENT | TASK_EVENT",
+              "isBaseType": true
+            },
+            {
+              "name": "title",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件标题",
+              "isBaseType": true
+            },
+            {
+              "name": "color",
+              "type": "String",
+              "isCollection": false,
+              "description": "显示颜色",
+              "isBaseType": true
+            },
+            {
+              "name": "comment",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注信息",
+              "isBaseType": true
+            },
+            {
+              "name": "commentId",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注LOB信息",
+              "isBaseType": true
+            },
+            {
+              "name": "startTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "事件开始时间",
+              "isBaseType": true
+            },
+            {
+              "name": "startTimeStr",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件开始时间(yyyy-MM-dd HH:mm:ss)",
+              "isBaseType": true
+            },
+            {
+              "name": "endTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "事件结束时间",
+              "isBaseType": true
+            },
+            {
+              "name": "endTimeStr",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件结束时间(yyyy-MM-dd HH:mm:ss)",
+              "isBaseType": true
+            },
+            {
+              "name": "locationName",
+              "type": "String",
+              "isCollection": false,
+              "description": "地点说明",
+              "isBaseType": true
+            },
+            {
+              "name": "longitude",
+              "type": "String",
+              "isCollection": false,
+              "description": "经度",
+              "isBaseType": true
+            },
+            {
+              "name": "latitude",
+              "type": "String",
+              "isCollection": false,
+              "description": "纬度",
+              "isBaseType": true
+            },
+            {
+              "name": "recurrenceRule",
+              "type": "String",
+              "isCollection": false,
+              "description": "重复日期表达式RecurrenceRule",
+              "isBaseType": true
+            },
+            {
+              "name": "recurrenceExc",
+              "type": "String",
+              "isCollection": false,
+              "description": "排除日期表达式RecurrenceExc",
+              "isBaseType": true
+            },
+            {
+              "name": "alarm",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否提醒",
+              "isBaseType": true
+            },
+            {
+              "name": "alarmTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "当前事件提醒时间",
+              "isBaseType": true
+            },
+            {
+              "name": "alarmAlready",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否已经提醒过了",
+              "isBaseType": true
+            },
+            {
+              "name": "valarmTime_config",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒提配置:天, 时, 分, 秒(负数为提前)",
+              "isBaseType": true
+            },
+            {
+              "name": "valarm_mailto",
+              "type": "String",
+              "isCollection": false,
+              "description": "提交Email地址,为空则不邮件提醒",
+              "isBaseType": true
+            },
+            {
+              "name": "valarm_Summary",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒显示标题",
+              "isBaseType": true
+            },
+            {
+              "name": "valarm_description",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒备注信息",
+              "isBaseType": true
+            },
+            {
+              "name": "isAllDayEvent",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否为全天事件",
+              "isBaseType": true
+            },
+            {
+              "name": "daysOfDuration",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "事件持续天数:0、1或者N天",
+              "isBaseType": true
+            },
+            {
+              "name": "isPublic",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否公开的事件",
+              "isBaseType": true
+            },
+            {
+              "name": "source",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息来源: PERSONAL| LEADER | UNIT | MEETING | BUSINESS_TRIP | HOLIDAY",
+              "isBaseType": true
+            },
+            {
+              "name": "bundle",
+              "type": "String",
+              "isCollection": false,
+              "description": "绑定来源数据标识",
+              "isBaseType": true
+            },
+            {
+              "name": "createPerson",
+              "type": "String",
+              "isCollection": false,
+              "description": "创建者",
+              "isBaseType": true
+            },
+            {
+              "name": "updatePerson",
+              "type": "String",
+              "isCollection": false,
+              "description": "最后更新者",
+              "isBaseType": true
+            },
+            {
+              "name": "targetType",
+              "type": "String",
+              "isCollection": false,
+              "description": "参与者类型:PERSON | UNIT | GROUP",
+              "isBaseType": true
+            },
+            {
+              "name": "participants",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "参与者列表",
+              "isBaseType": true
+            },
+            {
+              "name": "manageablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可管理人员列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见人员列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewableUnitList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见组织列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewableGroupList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见群组列表",
+              "isBaseType": true
+            },
+            {
+              "name": "distributeFactor",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "分布式存储标识位.",
+              "isBaseType": true
+            },
+            {
+              "name": "createTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "创建时间,自动生成,索引创建在约束中.",
+              "isBaseType": true
+            },
+            {
+              "name": "updateTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "修改时间,自动生成,索引创建在约束中.",
+              "isBaseType": true
+            },
+            {
+              "name": "sequence",
+              "type": "String",
+              "isCollection": false,
+              "description": "列表序号,由创建时间以及ID组成.在保存时自动生成,索引创建在约束中.",
+              "isBaseType": true
+            }
+          ],
+          "outs": [
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "id"
+            }
+          ]
+        },
+        {
+          "name": "destoryAfterEvent",
+          "className": "com.x.calendar.assemble.control.jaxrs.event.ActionDestroyAfterEventId",
+          "description": "删除重复日程事件中指定事件开始后续所有的日程事件信息",
+          "type": "DELETE",
+          "path": "jaxrs/event/after/{eventId}",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "eventId",
+              "type": "String",
+              "description": "日历事件信息ID"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "数据库主键,自动生成.",
+              "isBaseType": true
+            },
+            {
+              "name": "calendarId",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历账号ID",
+              "isBaseType": true
+            },
+            {
+              "name": "repeatMasterId",
+              "type": "String",
+              "isCollection": false,
+              "description": "重复日程宿主ID",
+              "isBaseType": true
+            },
+            {
+              "name": "eventType",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息类别: CAL_EVENT | TASK_EVENT",
+              "isBaseType": true
+            },
+            {
+              "name": "title",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件标题",
+              "isBaseType": true
+            },
+            {
+              "name": "color",
+              "type": "String",
+              "isCollection": false,
+              "description": "显示颜色",
+              "isBaseType": true
+            },
+            {
+              "name": "comment",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注信息",
+              "isBaseType": true
+            },
+            {
+              "name": "commentId",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注LOB信息",
+              "isBaseType": true
+            },
+            {
+              "name": "startTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "事件开始时间",
+              "isBaseType": true
+            },
+            {
+              "name": "startTimeStr",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件开始时间(yyyy-MM-dd HH:mm:ss)",
+              "isBaseType": true
+            },
+            {
+              "name": "endTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "事件结束时间",
+              "isBaseType": true
+            },
+            {
+              "name": "endTimeStr",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件结束时间(yyyy-MM-dd HH:mm:ss)",
+              "isBaseType": true
+            },
+            {
+              "name": "locationName",
+              "type": "String",
+              "isCollection": false,
+              "description": "地点说明",
+              "isBaseType": true
+            },
+            {
+              "name": "longitude",
+              "type": "String",
+              "isCollection": false,
+              "description": "经度",
+              "isBaseType": true
+            },
+            {
+              "name": "latitude",
+              "type": "String",
+              "isCollection": false,
+              "description": "纬度",
+              "isBaseType": true
+            },
+            {
+              "name": "recurrenceRule",
+              "type": "String",
+              "isCollection": false,
+              "description": "重复日期表达式RecurrenceRule",
+              "isBaseType": true
+            },
+            {
+              "name": "recurrenceExc",
+              "type": "String",
+              "isCollection": false,
+              "description": "排除日期表达式RecurrenceExc",
+              "isBaseType": true
+            },
+            {
+              "name": "alarm",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否提醒",
+              "isBaseType": true
+            },
+            {
+              "name": "alarmTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "当前事件提醒时间",
+              "isBaseType": true
+            },
+            {
+              "name": "alarmAlready",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否已经提醒过了",
+              "isBaseType": true
+            },
+            {
+              "name": "valarmTime_config",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒提配置:天, 时, 分, 秒(负数为提前)",
+              "isBaseType": true
+            },
+            {
+              "name": "valarm_mailto",
+              "type": "String",
+              "isCollection": false,
+              "description": "提交Email地址,为空则不邮件提醒",
+              "isBaseType": true
+            },
+            {
+              "name": "valarm_Summary",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒显示标题",
+              "isBaseType": true
+            },
+            {
+              "name": "valarm_description",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒备注信息",
+              "isBaseType": true
+            },
+            {
+              "name": "isAllDayEvent",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否为全天事件",
+              "isBaseType": true
+            },
+            {
+              "name": "daysOfDuration",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "事件持续天数:0、1或者N天",
+              "isBaseType": true
+            },
+            {
+              "name": "isPublic",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否公开的事件",
+              "isBaseType": true
+            },
+            {
+              "name": "source",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息来源: PERSONAL| LEADER | UNIT | MEETING | BUSINESS_TRIP | HOLIDAY",
+              "isBaseType": true
+            },
+            {
+              "name": "bundle",
+              "type": "String",
+              "isCollection": false,
+              "description": "绑定来源数据标识",
+              "isBaseType": true
+            },
+            {
+              "name": "createPerson",
+              "type": "String",
+              "isCollection": false,
+              "description": "创建者",
+              "isBaseType": true
+            },
+            {
+              "name": "updatePerson",
+              "type": "String",
+              "isCollection": false,
+              "description": "最后更新者",
+              "isBaseType": true
+            },
+            {
+              "name": "targetType",
+              "type": "String",
+              "isCollection": false,
+              "description": "参与者类型:PERSON | UNIT | GROUP",
+              "isBaseType": true
+            },
+            {
+              "name": "participants",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "参与者列表",
+              "isBaseType": true
+            },
+            {
+              "name": "manageablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可管理人员列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见人员列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewableUnitList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见组织列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewableGroupList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见群组列表",
+              "isBaseType": true
+            },
+            {
+              "name": "distributeFactor",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "分布式存储标识位.",
+              "isBaseType": true
+            },
+            {
+              "name": "createTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "创建时间,自动生成,索引创建在约束中.",
+              "isBaseType": true
+            },
+            {
+              "name": "updateTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "修改时间,自动生成,索引创建在约束中.",
+              "isBaseType": true
+            },
+            {
+              "name": "sequence",
+              "type": "String",
+              "isCollection": false,
+              "description": "列表序号,由创建时间以及ID组成.在保存时自动生成,索引创建在约束中.",
+              "isBaseType": true
+            }
+          ],
+          "outs": [
+            {
+              "name": "value",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "整型值"
+            }
+          ]
+        },
+        {
+          "name": "destoryAllEventsWithRepeatMaster",
+          "className": "com.x.calendar.assemble.control.jaxrs.event.ActionDestroyWithMaster",
+          "description": "根据指定事件ID删除所有的重复日历事件信息",
+          "type": "DELETE",
+          "path": "jaxrs/event/all/{eventId}",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "eventId",
+              "type": "String",
+              "description": "日历事件信息ID"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "id"
+            }
+          ]
+        },
+        {
+          "name": "destorySingleEvent",
+          "className": "com.x.calendar.assemble.control.jaxrs.event.ActionDestroySingleEventWithId",
+          "description": "根据事件ID删除指定的日历事件信息",
+          "type": "DELETE",
+          "path": "jaxrs/event/single/{eventId}",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "eventId",
+              "type": "String",
+              "description": "日历事件信息ID"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "id"
+            }
+          ]
+        },
+        {
+          "name": "get",
+          "className": "com.x.calendar.assemble.control.jaxrs.event.ActionGet",
+          "description": "根据ID获取日历事件信息",
+          "type": "GET",
+          "path": "jaxrs/event/{id}",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "id",
+              "type": "String",
+              "description": "日历事件信息ID"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "manageable",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "用户是否可以对该事件进行管理."
+            },
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "数据库主键,自动生成."
+            },
+            {
+              "name": "calendarId",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历账号ID"
+            },
+            {
+              "name": "repeatMasterId",
+              "type": "String",
+              "isCollection": false,
+              "description": "重复日程宿主ID"
+            },
+            {
+              "name": "eventType",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息类别: CAL_EVENT | TASK_EVENT"
+            },
+            {
+              "name": "title",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件标题"
+            },
+            {
+              "name": "color",
+              "type": "String",
+              "isCollection": false,
+              "description": "显示颜色"
+            },
+            {
+              "name": "comment",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注信息"
+            },
+            {
+              "name": "commentId",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注LOB信息"
+            },
+            {
+              "name": "startTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "事件开始时间"
+            },
+            {
+              "name": "startTimeStr",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件开始时间(yyyy-MM-dd HH:mm:ss)"
+            },
+            {
+              "name": "endTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "事件结束时间"
+            },
+            {
+              "name": "endTimeStr",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件结束时间(yyyy-MM-dd HH:mm:ss)"
+            },
+            {
+              "name": "locationName",
+              "type": "String",
+              "isCollection": false,
+              "description": "地点说明"
+            },
+            {
+              "name": "longitude",
+              "type": "String",
+              "isCollection": false,
+              "description": "经度"
+            },
+            {
+              "name": "latitude",
+              "type": "String",
+              "isCollection": false,
+              "description": "纬度"
+            },
+            {
+              "name": "recurrenceRule",
+              "type": "String",
+              "isCollection": false,
+              "description": "重复日期表达式RecurrenceRule"
+            },
+            {
+              "name": "recurrenceExc",
+              "type": "String",
+              "isCollection": false,
+              "description": "排除日期表达式RecurrenceExc"
+            },
+            {
+              "name": "alarm",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否提醒"
+            },
+            {
+              "name": "alarmTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "当前事件提醒时间"
+            },
+            {
+              "name": "alarmAlready",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否已经提醒过了"
+            },
+            {
+              "name": "valarmTime_config",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒提配置:天, 时, 分, 秒(负数为提前)"
+            },
+            {
+              "name": "valarm_mailto",
+              "type": "String",
+              "isCollection": false,
+              "description": "提交Email地址,为空则不邮件提醒"
+            },
+            {
+              "name": "valarm_Summary",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒显示标题"
+            },
+            {
+              "name": "valarm_description",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒备注信息"
+            },
+            {
+              "name": "isAllDayEvent",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否为全天事件"
+            },
+            {
+              "name": "daysOfDuration",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "事件持续天数:0、1或者N天"
+            },
+            {
+              "name": "isPublic",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否公开的事件"
+            },
+            {
+              "name": "source",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息来源: PERSONAL| LEADER | UNIT | MEETING | BUSINESS_TRIP | HOLIDAY"
+            },
+            {
+              "name": "bundle",
+              "type": "String",
+              "isCollection": false,
+              "description": "绑定来源数据标识"
+            },
+            {
+              "name": "createPerson",
+              "type": "String",
+              "isCollection": false,
+              "description": "创建者"
+            },
+            {
+              "name": "updatePerson",
+              "type": "String",
+              "isCollection": false,
+              "description": "最后更新者"
+            },
+            {
+              "name": "targetType",
+              "type": "String",
+              "isCollection": false,
+              "description": "参与者类型:PERSON | UNIT | GROUP"
+            },
+            {
+              "name": "participants",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "参与者列表"
+            },
+            {
+              "name": "manageablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可管理人员列表"
+            },
+            {
+              "name": "viewablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见人员列表"
+            },
+            {
+              "name": "viewableUnitList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见组织列表"
+            },
+            {
+              "name": "viewableGroupList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见群组列表"
+            },
+            {
+              "name": "distributeFactor",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "分布式存储标识位."
+            },
+            {
+              "name": "createTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "创建时间,自动生成,索引创建在约束中."
+            },
+            {
+              "name": "updateTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "修改时间,自动生成,索引创建在约束中."
+            },
+            {
+              "name": "sequence",
+              "type": "String",
+              "isCollection": false,
+              "description": "列表序号,由创建时间以及ID组成.在保存时自动生成,索引创建在约束中."
+            }
+          ]
+        },
+        {
+          "name": "getRFC",
+          "className": "com.x.calendar.assemble.control.jaxrs.event.ActionGetRFCContent",
+          "description": "根据ID获取日历事件信息的RFC内容",
+          "type": "GET",
+          "path": "jaxrs/event/rfc/{id}",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "id",
+              "type": "String",
+              "description": "日历事件信息ID"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "value",
+              "type": "String",
+              "isCollection": false,
+              "description": "字符串值"
+            }
+          ]
+        },
+        {
+          "name": "listWithFilter",
+          "className": "com.x.calendar.assemble.control.jaxrs.event.ActionListWithCondition",
+          "description": "根据条件查询日历事件信息列表",
+          "type": "PUT",
+          "path": "jaxrs/event/list/filter",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [
+            {
+              "name": "calendarIds",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "日历账号ID",
+              "isBaseType": true
+            },
+            {
+              "name": "eventType",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息类别: CAL_EVENT | TASK_EVENT",
+              "isBaseType": true
+            },
+            {
+              "name": "source",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息来源: PERSONAL| LEADER | UNIT | MEETING | BUSINESS_TRIP | HOLIDAY",
+              "isBaseType": true
+            },
+            {
+              "name": "key",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件标题 或者 备注信息 模糊搜索",
+              "isBaseType": true
+            },
+            {
+              "name": "startTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "查询开始时间",
+              "isBaseType": true
+            },
+            {
+              "name": "endTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "查询结束时间",
+              "isBaseType": true
+            },
+            {
+              "name": "createPerson",
+              "type": "String",
+              "isCollection": false,
+              "description": "创建者",
+              "isBaseType": true
+            }
+          ],
+          "outs": [
+            {
+              "name": "wholeDayEvents",
+              "type": "List\u003cWoCalendar_Event\u003e",
+              "isCollection": true,
+              "description": "全天或者持续超1天(跨1天)的事件列表."
+            },
+            {
+              "name": "inOneDayEvents",
+              "type": "List\u003cWoCalendar_Event_ForDay\u003e",
+              "isCollection": true,
+              "description": "持续时间在1天以内的事件列表.按日期分开"
+            }
+          ]
+        },
+        {
+          "name": "listWithFilterSample",
+          "className": "com.x.calendar.assemble.control.jaxrs.event.ActionSimpleListWithCondition",
+          "description": "根据条件查询日历事件信息列表(返回简单列表)",
+          "type": "PUT",
+          "path": "jaxrs/event/list/filter/sample",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [
+            {
+              "name": "calendarIds",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "日历账号ID",
+              "isBaseType": true
+            },
+            {
+              "name": "eventType",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息类别: CAL_EVENT | TASK_EVENT",
+              "isBaseType": true
+            },
+            {
+              "name": "source",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息来源: PERSONAL| LEADER | UNIT | MEETING | BUSINESS_TRIP | HOLIDAY",
+              "isBaseType": true
+            },
+            {
+              "name": "key",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件标题 或者 备注信息 模糊搜索",
+              "isBaseType": true
+            },
+            {
+              "name": "startTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "查询开始时间",
+              "isBaseType": true
+            },
+            {
+              "name": "endTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "查询结束时间",
+              "isBaseType": true
+            },
+            {
+              "name": "createPerson",
+              "type": "String",
+              "isCollection": false,
+              "description": "创建者",
+              "isBaseType": true
+            }
+          ],
+          "outs": [
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "数据库主键,自动生成."
+            },
+            {
+              "name": "calendarId",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历账号ID"
+            },
+            {
+              "name": "repeatMasterId",
+              "type": "String",
+              "isCollection": false,
+              "description": "重复日程宿主ID"
+            },
+            {
+              "name": "eventType",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息类别: CAL_EVENT | TASK_EVENT"
+            },
+            {
+              "name": "title",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件标题"
+            },
+            {
+              "name": "color",
+              "type": "String",
+              "isCollection": false,
+              "description": "显示颜色"
+            },
+            {
+              "name": "comment",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注信息"
+            },
+            {
+              "name": "commentId",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注LOB信息"
+            },
+            {
+              "name": "startTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "事件开始时间"
+            },
+            {
+              "name": "startTimeStr",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件开始时间(yyyy-MM-dd HH:mm:ss)"
+            },
+            {
+              "name": "endTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "事件结束时间"
+            },
+            {
+              "name": "endTimeStr",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件结束时间(yyyy-MM-dd HH:mm:ss)"
+            },
+            {
+              "name": "locationName",
+              "type": "String",
+              "isCollection": false,
+              "description": "地点说明"
+            },
+            {
+              "name": "longitude",
+              "type": "String",
+              "isCollection": false,
+              "description": "经度"
+            },
+            {
+              "name": "latitude",
+              "type": "String",
+              "isCollection": false,
+              "description": "纬度"
+            },
+            {
+              "name": "recurrenceRule",
+              "type": "String",
+              "isCollection": false,
+              "description": "重复日期表达式RecurrenceRule"
+            },
+            {
+              "name": "recurrenceExc",
+              "type": "String",
+              "isCollection": false,
+              "description": "排除日期表达式RecurrenceExc"
+            },
+            {
+              "name": "alarm",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否提醒"
+            },
+            {
+              "name": "alarmTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "当前事件提醒时间"
+            },
+            {
+              "name": "alarmAlready",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否已经提醒过了"
+            },
+            {
+              "name": "valarmTime_config",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒提配置:天, 时, 分, 秒(负数为提前)"
+            },
+            {
+              "name": "valarm_mailto",
+              "type": "String",
+              "isCollection": false,
+              "description": "提交Email地址,为空则不邮件提醒"
+            },
+            {
+              "name": "valarm_Summary",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒显示标题"
+            },
+            {
+              "name": "valarm_description",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒备注信息"
+            },
+            {
+              "name": "isAllDayEvent",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否为全天事件"
+            },
+            {
+              "name": "daysOfDuration",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "事件持续天数:0、1或者N天"
+            },
+            {
+              "name": "isPublic",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否公开的事件"
+            },
+            {
+              "name": "source",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息来源: PERSONAL| LEADER | UNIT | MEETING | BUSINESS_TRIP | HOLIDAY"
+            },
+            {
+              "name": "bundle",
+              "type": "String",
+              "isCollection": false,
+              "description": "绑定来源数据标识"
+            },
+            {
+              "name": "createPerson",
+              "type": "String",
+              "isCollection": false,
+              "description": "创建者"
+            },
+            {
+              "name": "updatePerson",
+              "type": "String",
+              "isCollection": false,
+              "description": "最后更新者"
+            },
+            {
+              "name": "targetType",
+              "type": "String",
+              "isCollection": false,
+              "description": "参与者类型:PERSON | UNIT | GROUP"
+            },
+            {
+              "name": "participants",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "参与者列表"
+            },
+            {
+              "name": "manageablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可管理人员列表"
+            },
+            {
+              "name": "viewablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见人员列表"
+            },
+            {
+              "name": "viewableUnitList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见组织列表"
+            },
+            {
+              "name": "viewableGroupList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见群组列表"
+            },
+            {
+              "name": "distributeFactor",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "分布式存储标识位."
+            },
+            {
+              "name": "createTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "创建时间,自动生成,索引创建在约束中."
+            },
+            {
+              "name": "updateTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "修改时间,自动生成,索引创建在约束中."
+            },
+            {
+              "name": "sequence",
+              "type": "String",
+              "isCollection": false,
+              "description": "列表序号,由创建时间以及ID组成.在保存时自动生成,索引创建在约束中."
+            }
+          ]
+        },
+        {
+          "name": "updateAfterEvent",
+          "className": "com.x.calendar.assemble.control.jaxrs.event.ActionUpdateAfterEventId",
+          "description": "更新重复日程事件中指定事件开始后续所有的日程事件信息",
+          "type": "PUT",
+          "path": "jaxrs/event/update/after/{eventId}",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "eventId",
+              "type": "String",
+              "description": "日历事件信息ID"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "数据库主键,自动生成.",
+              "isBaseType": true
+            },
+            {
+              "name": "calendarId",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历账号ID",
+              "isBaseType": true
+            },
+            {
+              "name": "repeatMasterId",
+              "type": "String",
+              "isCollection": false,
+              "description": "重复日程宿主ID",
+              "isBaseType": true
+            },
+            {
+              "name": "eventType",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息类别: CAL_EVENT | TASK_EVENT",
+              "isBaseType": true
+            },
+            {
+              "name": "title",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件标题",
+              "isBaseType": true
+            },
+            {
+              "name": "color",
+              "type": "String",
+              "isCollection": false,
+              "description": "显示颜色",
+              "isBaseType": true
+            },
+            {
+              "name": "comment",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注信息",
+              "isBaseType": true
+            },
+            {
+              "name": "commentId",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注LOB信息",
+              "isBaseType": true
+            },
+            {
+              "name": "startTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "事件开始时间",
+              "isBaseType": true
+            },
+            {
+              "name": "startTimeStr",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件开始时间(yyyy-MM-dd HH:mm:ss)",
+              "isBaseType": true
+            },
+            {
+              "name": "endTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "事件结束时间",
+              "isBaseType": true
+            },
+            {
+              "name": "endTimeStr",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件结束时间(yyyy-MM-dd HH:mm:ss)",
+              "isBaseType": true
+            },
+            {
+              "name": "locationName",
+              "type": "String",
+              "isCollection": false,
+              "description": "地点说明",
+              "isBaseType": true
+            },
+            {
+              "name": "longitude",
+              "type": "String",
+              "isCollection": false,
+              "description": "经度",
+              "isBaseType": true
+            },
+            {
+              "name": "latitude",
+              "type": "String",
+              "isCollection": false,
+              "description": "纬度",
+              "isBaseType": true
+            },
+            {
+              "name": "recurrenceRule",
+              "type": "String",
+              "isCollection": false,
+              "description": "重复日期表达式RecurrenceRule",
+              "isBaseType": true
+            },
+            {
+              "name": "recurrenceExc",
+              "type": "String",
+              "isCollection": false,
+              "description": "排除日期表达式RecurrenceExc",
+              "isBaseType": true
+            },
+            {
+              "name": "alarm",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否提醒",
+              "isBaseType": true
+            },
+            {
+              "name": "alarmTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "当前事件提醒时间",
+              "isBaseType": true
+            },
+            {
+              "name": "alarmAlready",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否已经提醒过了",
+              "isBaseType": true
+            },
+            {
+              "name": "valarmTime_config",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒提配置:天, 时, 分, 秒(负数为提前)",
+              "isBaseType": true
+            },
+            {
+              "name": "valarm_mailto",
+              "type": "String",
+              "isCollection": false,
+              "description": "提交Email地址,为空则不邮件提醒",
+              "isBaseType": true
+            },
+            {
+              "name": "valarm_Summary",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒显示标题",
+              "isBaseType": true
+            },
+            {
+              "name": "valarm_description",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒备注信息",
+              "isBaseType": true
+            },
+            {
+              "name": "isAllDayEvent",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否为全天事件",
+              "isBaseType": true
+            },
+            {
+              "name": "daysOfDuration",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "事件持续天数:0、1或者N天",
+              "isBaseType": true
+            },
+            {
+              "name": "isPublic",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否公开的事件",
+              "isBaseType": true
+            },
+            {
+              "name": "source",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息来源: PERSONAL| LEADER | UNIT | MEETING | BUSINESS_TRIP | HOLIDAY",
+              "isBaseType": true
+            },
+            {
+              "name": "bundle",
+              "type": "String",
+              "isCollection": false,
+              "description": "绑定来源数据标识",
+              "isBaseType": true
+            },
+            {
+              "name": "createPerson",
+              "type": "String",
+              "isCollection": false,
+              "description": "创建者",
+              "isBaseType": true
+            },
+            {
+              "name": "updatePerson",
+              "type": "String",
+              "isCollection": false,
+              "description": "最后更新者",
+              "isBaseType": true
+            },
+            {
+              "name": "targetType",
+              "type": "String",
+              "isCollection": false,
+              "description": "参与者类型:PERSON | UNIT | GROUP",
+              "isBaseType": true
+            },
+            {
+              "name": "participants",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "参与者列表",
+              "isBaseType": true
+            },
+            {
+              "name": "manageablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可管理人员列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见人员列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewableUnitList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见组织列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewableGroupList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见群组列表",
+              "isBaseType": true
+            },
+            {
+              "name": "distributeFactor",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "分布式存储标识位.",
+              "isBaseType": true
+            },
+            {
+              "name": "createTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "创建时间,自动生成,索引创建在约束中.",
+              "isBaseType": true
+            },
+            {
+              "name": "updateTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "修改时间,自动生成,索引创建在约束中.",
+              "isBaseType": true
+            },
+            {
+              "name": "sequence",
+              "type": "String",
+              "isCollection": false,
+              "description": "列表序号,由创建时间以及ID组成.在保存时自动生成,索引创建在约束中.",
+              "isBaseType": true
+            }
+          ],
+          "outs": [
+            {
+              "name": "value",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "整型值"
+            }
+          ]
+        },
+        {
+          "name": "updateAllEventsWithRepeatMaster",
+          "className": "com.x.calendar.assemble.control.jaxrs.event.ActionUpdateWithMaster",
+          "description": "更新事件所有的重复日程事件",
+          "type": "PUT",
+          "path": "jaxrs/event/update/all/{eventId}",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "eventId",
+              "type": "String",
+              "description": "日历事件信息ID"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "数据库主键,自动生成.",
+              "isBaseType": true
+            },
+            {
+              "name": "calendarId",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历账号ID",
+              "isBaseType": true
+            },
+            {
+              "name": "repeatMasterId",
+              "type": "String",
+              "isCollection": false,
+              "description": "重复日程宿主ID",
+              "isBaseType": true
+            },
+            {
+              "name": "eventType",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息类别: CAL_EVENT | TASK_EVENT",
+              "isBaseType": true
+            },
+            {
+              "name": "title",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件标题",
+              "isBaseType": true
+            },
+            {
+              "name": "color",
+              "type": "String",
+              "isCollection": false,
+              "description": "显示颜色",
+              "isBaseType": true
+            },
+            {
+              "name": "comment",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注信息",
+              "isBaseType": true
+            },
+            {
+              "name": "commentId",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注LOB信息",
+              "isBaseType": true
+            },
+            {
+              "name": "startTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "事件开始时间",
+              "isBaseType": true
+            },
+            {
+              "name": "startTimeStr",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件开始时间(yyyy-MM-dd HH:mm:ss)",
+              "isBaseType": true
+            },
+            {
+              "name": "endTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "事件结束时间",
+              "isBaseType": true
+            },
+            {
+              "name": "endTimeStr",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件结束时间(yyyy-MM-dd HH:mm:ss)",
+              "isBaseType": true
+            },
+            {
+              "name": "locationName",
+              "type": "String",
+              "isCollection": false,
+              "description": "地点说明",
+              "isBaseType": true
+            },
+            {
+              "name": "longitude",
+              "type": "String",
+              "isCollection": false,
+              "description": "经度",
+              "isBaseType": true
+            },
+            {
+              "name": "latitude",
+              "type": "String",
+              "isCollection": false,
+              "description": "纬度",
+              "isBaseType": true
+            },
+            {
+              "name": "recurrenceRule",
+              "type": "String",
+              "isCollection": false,
+              "description": "重复日期表达式RecurrenceRule",
+              "isBaseType": true
+            },
+            {
+              "name": "recurrenceExc",
+              "type": "String",
+              "isCollection": false,
+              "description": "排除日期表达式RecurrenceExc",
+              "isBaseType": true
+            },
+            {
+              "name": "alarm",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否提醒",
+              "isBaseType": true
+            },
+            {
+              "name": "alarmTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "当前事件提醒时间",
+              "isBaseType": true
+            },
+            {
+              "name": "alarmAlready",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否已经提醒过了",
+              "isBaseType": true
+            },
+            {
+              "name": "valarmTime_config",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒提配置:天, 时, 分, 秒(负数为提前)",
+              "isBaseType": true
+            },
+            {
+              "name": "valarm_mailto",
+              "type": "String",
+              "isCollection": false,
+              "description": "提交Email地址,为空则不邮件提醒",
+              "isBaseType": true
+            },
+            {
+              "name": "valarm_Summary",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒显示标题",
+              "isBaseType": true
+            },
+            {
+              "name": "valarm_description",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒备注信息",
+              "isBaseType": true
+            },
+            {
+              "name": "isAllDayEvent",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否为全天事件",
+              "isBaseType": true
+            },
+            {
+              "name": "daysOfDuration",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "事件持续天数:0、1或者N天",
+              "isBaseType": true
+            },
+            {
+              "name": "isPublic",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否公开的事件",
+              "isBaseType": true
+            },
+            {
+              "name": "source",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息来源: PERSONAL| LEADER | UNIT | MEETING | BUSINESS_TRIP | HOLIDAY",
+              "isBaseType": true
+            },
+            {
+              "name": "bundle",
+              "type": "String",
+              "isCollection": false,
+              "description": "绑定来源数据标识",
+              "isBaseType": true
+            },
+            {
+              "name": "createPerson",
+              "type": "String",
+              "isCollection": false,
+              "description": "创建者",
+              "isBaseType": true
+            },
+            {
+              "name": "updatePerson",
+              "type": "String",
+              "isCollection": false,
+              "description": "最后更新者",
+              "isBaseType": true
+            },
+            {
+              "name": "targetType",
+              "type": "String",
+              "isCollection": false,
+              "description": "参与者类型:PERSON | UNIT | GROUP",
+              "isBaseType": true
+            },
+            {
+              "name": "participants",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "参与者列表",
+              "isBaseType": true
+            },
+            {
+              "name": "manageablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可管理人员列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见人员列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewableUnitList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见组织列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewableGroupList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见群组列表",
+              "isBaseType": true
+            },
+            {
+              "name": "distributeFactor",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "分布式存储标识位.",
+              "isBaseType": true
+            },
+            {
+              "name": "createTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "创建时间,自动生成,索引创建在约束中.",
+              "isBaseType": true
+            },
+            {
+              "name": "updateTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "修改时间,自动生成,索引创建在约束中.",
+              "isBaseType": true
+            },
+            {
+              "name": "sequence",
+              "type": "String",
+              "isCollection": false,
+              "description": "列表序号,由创建时间以及ID组成.在保存时自动生成,索引创建在约束中.",
+              "isBaseType": true
+            }
+          ],
+          "outs": [
+            {
+              "name": "value",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "整型值"
+            }
+          ]
+        },
+        {
+          "name": "updateSingleEvent",
+          "className": "com.x.calendar.assemble.control.jaxrs.event.ActionUpdateSingleEventWithId",
+          "description": "根据事件ID更新单个日程事件信息",
+          "type": "PUT",
+          "path": "jaxrs/event/update/single/{eventId}",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "eventId",
+              "type": "String",
+              "description": "日历事件信息ID"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "数据库主键,自动生成.",
+              "isBaseType": true
+            },
+            {
+              "name": "calendarId",
+              "type": "String",
+              "isCollection": false,
+              "description": "日历账号ID",
+              "isBaseType": true
+            },
+            {
+              "name": "repeatMasterId",
+              "type": "String",
+              "isCollection": false,
+              "description": "重复日程宿主ID",
+              "isBaseType": true
+            },
+            {
+              "name": "eventType",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息类别: CAL_EVENT | TASK_EVENT",
+              "isBaseType": true
+            },
+            {
+              "name": "title",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件标题",
+              "isBaseType": true
+            },
+            {
+              "name": "color",
+              "type": "String",
+              "isCollection": false,
+              "description": "显示颜色",
+              "isBaseType": true
+            },
+            {
+              "name": "comment",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注信息",
+              "isBaseType": true
+            },
+            {
+              "name": "commentId",
+              "type": "String",
+              "isCollection": false,
+              "description": "备注LOB信息",
+              "isBaseType": true
+            },
+            {
+              "name": "startTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "事件开始时间",
+              "isBaseType": true
+            },
+            {
+              "name": "startTimeStr",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件开始时间(yyyy-MM-dd HH:mm:ss)",
+              "isBaseType": true
+            },
+            {
+              "name": "endTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "事件结束时间",
+              "isBaseType": true
+            },
+            {
+              "name": "endTimeStr",
+              "type": "String",
+              "isCollection": false,
+              "description": "事件结束时间(yyyy-MM-dd HH:mm:ss)",
+              "isBaseType": true
+            },
+            {
+              "name": "locationName",
+              "type": "String",
+              "isCollection": false,
+              "description": "地点说明",
+              "isBaseType": true
+            },
+            {
+              "name": "longitude",
+              "type": "String",
+              "isCollection": false,
+              "description": "经度",
+              "isBaseType": true
+            },
+            {
+              "name": "latitude",
+              "type": "String",
+              "isCollection": false,
+              "description": "纬度",
+              "isBaseType": true
+            },
+            {
+              "name": "recurrenceRule",
+              "type": "String",
+              "isCollection": false,
+              "description": "重复日期表达式RecurrenceRule",
+              "isBaseType": true
+            },
+            {
+              "name": "recurrenceExc",
+              "type": "String",
+              "isCollection": false,
+              "description": "排除日期表达式RecurrenceExc",
+              "isBaseType": true
+            },
+            {
+              "name": "alarm",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否提醒",
+              "isBaseType": true
+            },
+            {
+              "name": "alarmTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "当前事件提醒时间",
+              "isBaseType": true
+            },
+            {
+              "name": "alarmAlready",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否已经提醒过了",
+              "isBaseType": true
+            },
+            {
+              "name": "valarmTime_config",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒提配置:天, 时, 分, 秒(负数为提前)",
+              "isBaseType": true
+            },
+            {
+              "name": "valarm_mailto",
+              "type": "String",
+              "isCollection": false,
+              "description": "提交Email地址,为空则不邮件提醒",
+              "isBaseType": true
+            },
+            {
+              "name": "valarm_Summary",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒显示标题",
+              "isBaseType": true
+            },
+            {
+              "name": "valarm_description",
+              "type": "String",
+              "isCollection": false,
+              "description": "提醒备注信息",
+              "isBaseType": true
+            },
+            {
+              "name": "isAllDayEvent",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否为全天事件",
+              "isBaseType": true
+            },
+            {
+              "name": "daysOfDuration",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "事件持续天数:0、1或者N天",
+              "isBaseType": true
+            },
+            {
+              "name": "isPublic",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "是否公开的事件",
+              "isBaseType": true
+            },
+            {
+              "name": "source",
+              "type": "String",
+              "isCollection": false,
+              "description": "信息来源: PERSONAL| LEADER | UNIT | MEETING | BUSINESS_TRIP | HOLIDAY",
+              "isBaseType": true
+            },
+            {
+              "name": "bundle",
+              "type": "String",
+              "isCollection": false,
+              "description": "绑定来源数据标识",
+              "isBaseType": true
+            },
+            {
+              "name": "createPerson",
+              "type": "String",
+              "isCollection": false,
+              "description": "创建者",
+              "isBaseType": true
+            },
+            {
+              "name": "updatePerson",
+              "type": "String",
+              "isCollection": false,
+              "description": "最后更新者",
+              "isBaseType": true
+            },
+            {
+              "name": "targetType",
+              "type": "String",
+              "isCollection": false,
+              "description": "参与者类型:PERSON | UNIT | GROUP",
+              "isBaseType": true
+            },
+            {
+              "name": "participants",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "参与者列表",
+              "isBaseType": true
+            },
+            {
+              "name": "manageablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可管理人员列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewablePersonList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见人员列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewableUnitList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见组织列表",
+              "isBaseType": true
+            },
+            {
+              "name": "viewableGroupList",
+              "type": "List\u003cString\u003e",
+              "isCollection": true,
+              "description": "可见群组列表",
+              "isBaseType": true
+            },
+            {
+              "name": "distributeFactor",
+              "type": "Integer",
+              "isCollection": false,
+              "description": "分布式存储标识位.",
+              "isBaseType": true
+            },
+            {
+              "name": "createTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "创建时间,自动生成,索引创建在约束中.",
+              "isBaseType": true
+            },
+            {
+              "name": "updateTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "修改时间,自动生成,索引创建在约束中.",
+              "isBaseType": true
+            },
+            {
+              "name": "sequence",
+              "type": "String",
+              "isCollection": false,
+              "description": "列表序号,由创建时间以及ID组成.在保存时自动生成,索引创建在约束中.",
+              "isBaseType": true
+            }
+          ],
+          "outs": [
+            {
+              "name": "id",
+              "type": "String",
+              "isCollection": false,
+              "description": "id"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "name": "Calendar_EventMessageAction",
+      "className": "com.x.calendar.assemble.control.jaxrs.event.Calendar_EventMessageAction",
+      "description": "消息处理",
+      "methods": [
+        {
+          "name": "messageReceive",
+          "className": "com.x.calendar.assemble.control.jaxrs.event.ActionMessageReceive",
+          "description": "接收日历消息",
+          "type": "POST",
+          "path": "jaxrs/message",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [
+            {
+              "name": "type",
+              "type": "String",
+              "isCollection": false,
+              "description": "消息类型:meeting_invite | meeting_delete | meeting_accept | meeting_reject",
+              "isBaseType": true
+            },
+            {
+              "name": "person",
+              "type": "String",
+              "isCollection": false,
+              "description": "接收者",
+              "isBaseType": true
+            },
+            {
+              "name": "title",
+              "type": "String",
+              "isCollection": false,
+              "description": "消息提醒标题",
+              "isBaseType": true
+            },
+            {
+              "name": "body",
+              "type": "JsonElement",
+              "isCollection": false,
+              "description": "消息内容",
+              "isBaseType": false
+            }
+          ],
+          "outs": [
+            {
+              "name": "value",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "布尔值."
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "name": "EchoAction",
+      "className": "com.x.base.core.project.jaxrs.echo.EchoAction",
+      "description": "响应",
+      "methods": [
+        {
+          "name": "get",
+          "className": "com.x.base.core.project.jaxrs.echo.ActionGet",
+          "description": "获取应答.",
+          "type": "GET",
+          "path": "jaxrs/echo",
+          "contentType": "application/json",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "servletContextName",
+              "type": "String",
+              "isCollection": false,
+              "description": "上下文根"
+            },
+            {
+              "name": "serverTime",
+              "type": "Date",
+              "isCollection": false,
+              "description": "服务器时间"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "name": "FireScheduleAction",
+      "className": "com.x.base.core.project.jaxrs.fireschedule.FireScheduleAction",
+      "description": "触发任务",
+      "methods": [
+        {
+          "name": "execute",
+          "className": "com.x.base.core.project.jaxrs.fireschedule.ActionExecute",
+          "description": "接受x_program_center发送过来的运行schedule.",
+          "type": "GET",
+          "path": "jaxrs/fireschedule/classname/{className}",
+          "contentType": "application/json",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "className",
+              "type": "String",
+              "description": "运行类"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "value",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "布尔值."
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "name": "LoggerAction",
+      "className": "com.x.base.core.project.jaxrs.logger.LoggerAction",
+      "description": "日志操作",
+      "methods": [
+        {
+          "name": "debug",
+          "className": "com.x.base.core.project.jaxrs.logger.ActionDebug",
+          "description": "设置日志级别为DEBUG.",
+          "type": "GET",
+          "path": "jaxrs/logger/debug",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "value",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "布尔值."
+            }
+          ]
+        },
+        {
+          "name": "get",
+          "className": "com.x.base.core.project.jaxrs.logger.ActionGet",
+          "description": "获取当前日志级别.",
+          "type": "GET",
+          "path": "jaxrs/logger",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "value",
+              "type": "String",
+              "isCollection": false,
+              "description": "字符串值"
+            }
+          ]
+        },
+        {
+          "name": "info",
+          "className": "com.x.base.core.project.jaxrs.logger.ActionInfo",
+          "description": "设置日志级别为INFO",
+          "type": "GET",
+          "path": "jaxrs/logger/info",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "value",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "布尔值."
+            }
+          ]
+        },
+        {
+          "name": "trace",
+          "className": "com.x.base.core.project.jaxrs.logger.ActionTrace",
+          "description": "设置日志级别为TRACE.",
+          "type": "GET",
+          "path": "jaxrs/logger/trace",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "value",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "布尔值."
+            }
+          ]
+        },
+        {
+          "name": "warn",
+          "className": "com.x.base.core.project.jaxrs.logger.ActionWarn",
+          "description": "设置日志级别为WARN",
+          "type": "GET",
+          "path": "jaxrs/logger/warn",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "value",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "布尔值."
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "name": "SysResourceAction",
+      "className": "com.x.base.core.project.jaxrs.sysresource.SysResourceAction",
+      "description": "系统资源",
+      "methods": [
+        {
+          "name": "listResource",
+          "className": "com.x.base.core.project.jaxrs.sysresource.ActionListResource",
+          "description": "获取静态资源信息.",
+          "type": "GET",
+          "path": "jaxrs/sysresource/filePath/{filePath}",
+          "contentType": "application/json",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": false,
+          "pathParameters": [
+            {
+              "name": "filePath",
+              "type": "String",
+              "description": "查找路径(根路径:(0))"
+            }
+          ],
+          "formParameters": [],
+          "queryParameters": [],
+          "ins": [],
+          "outs": []
+        },
+        {
+          "name": "uploadResource",
+          "className": "com.x.base.core.project.jaxrs.sysresource.ActionUploadResource",
+          "description": "上传静态资源(仅上传到当前服务器)",
+          "type": "POST",
+          "path": "jaxrs/sysresource/upload/resource/as/new/{asNew}",
+          "contentType": "multipart/form-data",
+          "resultContentType": "application/json; charset\u003dUTF-8",
+          "useJsonElementParameter": false,
+          "useStringParameter": true,
+          "pathParameters": [
+            {
+              "name": "asNew",
+              "type": "Boolean",
+              "description": "覆盖类型:true删除原文件然后上传,false覆盖原文件"
+            }
+          ],
+          "formParameters": [
+            {
+              "name": "file",
+              "type": "File",
+              "description": "上传文件"
+            },
+            {
+              "name": "fileName",
+              "type": "String",
+              "description": "附件名称"
+            },
+            {
+              "name": "filePath",
+              "type": "String",
+              "description": "附件存放目录(可以为空)"
+            }
+          ],
+          "queryParameters": [],
+          "ins": [],
+          "outs": [
+            {
+              "name": "value",
+              "type": "Boolean",
+              "isCollection": false,
+              "description": "布尔值."
+            }
+          ]
+        }
+      ]
+    }
+  ]
+}

+ 32 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/AbstractFactory.java

@@ -0,0 +1,32 @@
+package com.x.calendar.assemble.control;
+
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.calendar.core.entity.Calendar_EventComment;
+
+import java.util.Date;
+import java.util.List;
+
+public abstract class AbstractFactory {
+
+	private Business business;
+
+	public AbstractFactory(Business business) throws Exception {
+		try {
+			if (null == business) {
+				throw new Exception("business can not be null.");
+			}
+			this.business = business;
+		} catch (Exception e) {
+			throw new Exception("can not instantiating factory.");
+		}
+	}
+
+	public EntityManagerContainer entityManagerContainer() throws Exception {
+		return this.business.entityManagerContainer();
+	}
+
+	public Business business() throws Exception {
+		return this.business;
+	}
+
+}

+ 32 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/ApplicationServletContextListener.java

@@ -0,0 +1,32 @@
+package com.x.calendar.assemble.control;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+import javax.servlet.annotation.WebListener;
+
+import com.x.base.core.project.Context;
+
+@WebListener
+public class ApplicationServletContextListener implements ServletContextListener {
+
+	@Override
+	public void contextInitialized(ServletContextEvent servletContextEvent) {
+		try {
+			ThisApplication.context = Context.concrete(servletContextEvent);
+			ThisApplication.init();
+			ThisApplication.context().regist();
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	@Override
+	public void contextDestroyed(ServletContextEvent servletContextEvent) {
+		try {
+			ThisApplication.destroy();
+			ThisApplication.context.destrory(servletContextEvent);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+}

+ 66 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/Business.java

@@ -0,0 +1,66 @@
+package com.x.calendar.assemble.control;
+
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.calendar.assemble.control.factory.*;
+import com.x.organization.core.express.Organization;
+
+public class Business {
+
+	private EntityManagerContainer emc;
+
+	public Business(EntityManagerContainer emc) throws Exception {
+		this.emc = emc;
+	}
+
+	public EntityManagerContainer entityManagerContainer() {
+		return this.emc;
+	}
+
+	private Organization organization;
+	public Organization organization() throws Exception {
+		if (null == this.organization) {
+			this.organization = new Organization(ThisApplication.context());
+		}
+		return organization;
+	}
+	
+	private Calendar_SettingFactory calendar_SettingFactory;	
+	public Calendar_SettingFactory calendar_SettingFactory() throws Exception {
+		if (null == this.calendar_SettingFactory) {
+			this.calendar_SettingFactory = new Calendar_SettingFactory( this );
+		}
+		return calendar_SettingFactory;
+	}
+
+	private CalendarFactory calendarFactory;	
+	public CalendarFactory calendarFactory() throws Exception {
+		if (null == this.calendarFactory) {
+			this.calendarFactory = new CalendarFactory( this );
+		}
+		return calendarFactory;
+	}
+	
+	private Calendar_EventFactory calendar_EventFactory;	
+	public Calendar_EventFactory calendar_EventFactory() throws Exception {
+		if (null == this.calendar_EventFactory) {
+			this.calendar_EventFactory = new Calendar_EventFactory( this );
+		}
+		return calendar_EventFactory;
+	}
+
+	private Calendar_EventCommentFactory calendar_EventCommentFactory;
+	public Calendar_EventCommentFactory calendar_EventCommentFactory() throws Exception {
+		if (null == this.calendar_EventCommentFactory) {
+			this.calendar_EventCommentFactory = new Calendar_EventCommentFactory( this );
+		}
+		return calendar_EventCommentFactory;
+	}
+
+	private Calendar_EventRepeatMasterFactory calendar_EventRepeatMasterFactory;	
+	public Calendar_EventRepeatMasterFactory calendar_EventRepeatMasterFactory() throws Exception {
+		if (null == this.calendar_EventRepeatMasterFactory) {
+			this.calendar_EventRepeatMasterFactory = new Calendar_EventRepeatMasterFactory( this );
+		}
+		return calendar_EventRepeatMasterFactory;
+	}
+}

+ 5 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/EnumCalendarSource.java

@@ -0,0 +1,5 @@
+package com.x.calendar.assemble.control;
+
+public enum EnumCalendarSource {
+	PERSON, LEADER, UNIT, MEETING, BUSINESS_TRIP, HOLIDAY
+}

+ 5 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/EnumCalendarTaskType.java

@@ -0,0 +1,5 @@
+package com.x.calendar.assemble.control;
+
+public enum EnumCalendarTaskType {
+	CALENDAR, TASK
+}

+ 5 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/EnumRemindPolicy.java

@@ -0,0 +1,5 @@
+package com.x.calendar.assemble.control;
+
+public enum EnumRemindPolicy {
+	NONE, MIN_5, MIN_10, MIN_15, MIN_30, HOUR_1, DAY_1, DAY_2, WEEK_1
+}

+ 13 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/ExceptionWrapInConvert.java

@@ -0,0 +1,13 @@
+package com.x.calendar.assemble.control;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.project.exception.PromptException;
+
+public class ExceptionWrapInConvert extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	public ExceptionWrapInConvert( Throwable e, JsonElement jsonElement) {
+		super( "系统在将JSON信息转换为对象时发生异常。JSON:" + jsonElement.toString(), e);
+	}
+}

+ 7 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/MimeTypeDefinition.java

@@ -0,0 +1,7 @@
+package com.x.calendar.assemble.control;
+
+import javax.activation.MimetypesFileTypeMap;
+
+public class MimeTypeDefinition {
+	public static MimetypesFileTypeMap instance;
+}

+ 210 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/ThisApplication.java

@@ -0,0 +1,210 @@
+package com.x.calendar.assemble.control;
+
+import com.x.base.core.project.Context;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.message.MessageConnector;
+import com.x.base.core.project.tools.ListTools;
+import com.x.calendar.assemble.control.schedule.AlarmTrigger;
+import com.x.calendar.assemble.control.schedule.CheckEventComment;
+import com.x.calendar.assemble.control.service.UserManagerService;
+import com.x.calendar.core.entity.Calendar;
+import com.x.calendar.core.entity.Calendar_Event;
+
+import java.util.List;
+
+public class ThisApplication {
+
+	protected static Context context;
+	public static final String CalendarMANAGER = "CalendarManager";
+	public static Context context() {
+		return context;
+	}
+
+	public static void init() throws Exception {
+		try {
+			MessageConnector.start(context());
+			//每30秒检查一次需要推送的消息
+			context.schedule(AlarmTrigger.class, "0/30 * * * * ?");
+			//每两小时检查一次comment信息的引用情况,删除多余的不必要的数据
+			context.schedule(CheckEventComment.class, "* * */2 * * ?");
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	public static void destroy() {
+		try {
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	/**
+	 * 判断用户是否有Calendar系统管理权限 1、系统管理员Manager或者xadmin 2、拥有CalendarManager角色的人员
+	 * 
+	 * @param effectivePerson
+	 * @return
+	 */
+	public static Boolean isCalendarSystemManager(EffectivePerson effectivePerson) {
+		UserManagerService userManagerService = new UserManagerService();
+		try {
+			if (userManagerService.isHasPlatformRole(effectivePerson.getDistinguishedName(),
+					ThisApplication.CalendarMANAGER) || effectivePerson.isManager()) {
+				return true;
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		return false;
+	}
+
+	/**
+	 * 判断用户是否拥有指定日历的管理权限
+	 * 
+	 * @param effectivePerson
+	 * @param calendar
+	 * @return
+	 */
+	public static Boolean isCalendarManager(EffectivePerson effectivePerson, Calendar calendar) {
+		if (isCalendarSystemManager(effectivePerson)) {
+			return true;
+		}
+		if (calendar != null) {
+			// 判断管理权限
+			if (calendar.getCreateor().equalsIgnoreCase(effectivePerson.getDistinguishedName())) {
+				return true;
+			}
+			if (ListTools.isNotEmpty(calendar.getManageablePersonList())
+					&& calendar.getManageablePersonList().contains(effectivePerson.getDistinguishedName())) {
+				return true;
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * 判断用户是否拥有指定日历的日程事件发布权限
+	 * 
+	 * @param effectivePerson
+	 * @param calendar
+	 * @return
+	 */
+	public static Boolean isCalendarPublisher(EffectivePerson effectivePerson, List<String> unitNames,
+			List<String> groupNames, Calendar calendar) {
+		if (isCalendarSystemManager(effectivePerson)) {
+			return true;
+		}
+		if (calendar != null) {
+			if (isCalendarManager(effectivePerson, calendar)) {
+				return true;
+			}
+			// 判断发布权限
+			String personName = effectivePerson.getDistinguishedName();
+			if (ListTools.isNotEmpty(calendar.getPublishablePersonList())
+					&& calendar.getPublishablePersonList().contains(personName)) {
+				return true;
+			}
+			if (ListTools.isNotEmpty(calendar.getPublishableUnitList()) && ListTools.isNotEmpty(unitNames)) {
+				for (String publishUnitName : calendar.getPublishableUnitList()) {
+					for (String unitName : unitNames) {
+						if (unitName.equalsIgnoreCase(publishUnitName)) {
+							return true;
+						}
+					}
+				}
+			}
+			if (ListTools.isNotEmpty(calendar.getPublishableGroupList()) && ListTools.isNotEmpty(groupNames)) {
+				for (String publishGroupName : calendar.getPublishableGroupList()) {
+					for (String groupName : groupNames) {
+						if (groupName.equalsIgnoreCase(publishGroupName)) {
+							return true;
+						}
+					}
+				}
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * 判断用户是否拥有指定日历的日程事件发布权限
+	 * 
+	 * @param effectivePerson
+	 * @param calendar
+	 * @return
+	 * @throws Exception
+	 */
+	public static Boolean isCalendarPublisher(EffectivePerson effectivePerson, Calendar calendar) throws Exception {
+		if (isCalendarSystemManager(effectivePerson)) {
+			return true;
+		}
+		List<String> unitNames = null;
+		List<String> groupNames = null;
+		if (calendar != null) {
+			if (isCalendarManager(effectivePerson, calendar)) {
+				return true;
+			}
+			UserManagerService userManagerService = new UserManagerService();
+			// 判断发布权限
+			String personName = effectivePerson.getDistinguishedName();
+			unitNames = userManagerService.listUnitNamesWithPerson(personName);
+			groupNames = userManagerService.listGroupNamesByPerson(personName);
+			if (ListTools.isNotEmpty(calendar.getPublishablePersonList())
+					&& calendar.getPublishablePersonList().contains(personName)) {
+				return true;
+			}
+			if (ListTools.isNotEmpty(calendar.getPublishableUnitList()) && ListTools.isNotEmpty(unitNames)) {
+				for (String publishUnitName : calendar.getPublishableUnitList()) {
+					for (String unitName : unitNames) {
+						if (unitName.equalsIgnoreCase(publishUnitName)) {
+							return true;
+						}
+					}
+				}
+			}
+			if (ListTools.isNotEmpty(calendar.getPublishableGroupList()) && ListTools.isNotEmpty(groupNames)) {
+				for (String publishGroupName : calendar.getPublishableGroupList()) {
+					for (String groupName : groupNames) {
+						if (groupName.equalsIgnoreCase(publishGroupName)) {
+							return true;
+						}
+					}
+				}
+			}
+		}
+		return false;
+	}
+
+	/**
+	 * 判断用户是否拥有指定日程事件的管理权限
+	 * 
+	 * @param effectivePerson
+	 * @param event
+	 * @return
+	 * @throws Exception
+	 */
+	public static Boolean isEventManager(EffectivePerson effectivePerson, Calendar calendar, Calendar_Event event)
+			throws Exception {
+		if (isCalendarSystemManager(effectivePerson)) {
+			return true;
+		}
+		List<String> unitNames = null;
+		List<String> groupNames = null;
+		if (event != null) {
+			UserManagerService userManagerService = new UserManagerService();
+			String personName = effectivePerson.getDistinguishedName();
+			unitNames = userManagerService.listUnitNamesWithPerson(personName);
+			groupNames = userManagerService.listGroupNamesByPerson(personName);
+			// 判断日历的发布权限
+			if (isCalendarPublisher(effectivePerson, unitNames, groupNames, calendar)) {
+				return true;
+			}
+			// 判断事件的管理权限
+			if (ListTools.isNotEmpty(event.getManageablePersonList())
+					&& calendar.getManageablePersonList().contains(personName)) {
+				return true;
+			}
+		}
+		return false;
+	}
+}

+ 157 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/factory/CalendarFactory.java

@@ -0,0 +1,157 @@
+package com.x.calendar.assemble.control.factory;
+
+import java.util.ArrayList;
+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 org.apache.commons.lang3.StringUtils;
+
+import com.x.base.core.project.tools.ListTools;
+import com.x.calendar.assemble.control.AbstractFactory;
+import com.x.calendar.assemble.control.Business;
+import com.x.calendar.core.entity.Calendar;
+import com.x.calendar.core.entity.Calendar_;
+import com.x.calendar.core.tools.CriteriaBuilderTools;
+
+
+/**
+ * 日历账户信息表功能服务类
+ * @author O2LEE
+ */
+public class CalendarFactory extends AbstractFactory {
+	
+	public CalendarFactory( Business business) throws Exception {
+		super(business);
+	}
+
+	/**
+	 * 获取指定Id的日历账户配置信息对象
+	 * @param id
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar get( String id ) throws Exception {
+		return this.entityManagerContainer().find(id, Calendar.class );
+	}
+	
+	/**
+	 * 列示全部的日历账户配置信息列表
+	 * @return
+	 * @throws Exception
+	 */
+	@SuppressWarnings("unused")
+	public List<Calendar> listAll() throws Exception {
+		EntityManager em = this.entityManagerContainer().get(Calendar.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Calendar> cq = cb.createQuery(Calendar.class);
+		Root<Calendar> root = cq.from( Calendar.class);
+		return em.createQuery(cq).getResultList();
+	}
+	
+	/**
+	 * 列示指定Id的日历账户配置信息列表
+	 * @param ids
+	 * @return
+	 * @throws Exception
+	 */
+	public List<Calendar> list(List<String> ids) throws Exception {
+		if( ids == null || ids.size() == 0 ){
+			return new ArrayList<Calendar>();
+		}
+		EntityManager em = this.entityManagerContainer().get(Calendar.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Calendar> cq = cb.createQuery(Calendar.class);
+		Root<Calendar> root = cq.from(Calendar.class);
+		Predicate p = root.get( Calendar_.id).in(ids);
+		return em.createQuery(cq.where(p)).getResultList();
+	}
+
+	/**
+	 * 根据条件查询指定的日历信息ID列表
+	 * @param personName
+	 * @param unitNames
+	 * @param groupNames
+	 * @param name
+	 * @param type
+	 * @param source
+	 * @param createor
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listWithCondition( String name, String type, String source, String createor, List<String> inFilterCalendarIds,
+			 String personName, List<String> unitNames, List<String> groupNames ) throws Exception {
+		EntityManager em = this.entityManagerContainer().get(Calendar.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<String> cq = cb.createQuery(String.class);
+		Root<Calendar> root = cq.from(Calendar.class);
+
+		Predicate p = null;
+		if( ListTools.isNotEmpty( inFilterCalendarIds )) {
+			p = CriteriaBuilderTools.predicate_and( cb, p, root.get(Calendar_.id).in( inFilterCalendarIds ));
+		}
+		if( StringUtils.isNotEmpty( name )) {
+			p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal(root.get(Calendar_.name), name));
+		}
+		if( StringUtils.isNotEmpty( type )) {
+			p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal(root.get(Calendar_.type), type));
+		}
+		if( StringUtils.isNotEmpty( source )) {
+			p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal(root.get(Calendar_.source), source));
+		}
+		if( StringUtils.isNotEmpty( createor )) {
+			p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal(root.get(Calendar_.createor), createor));
+		}		
+		
+		Predicate permission = null;
+		if( StringUtils.isNotEmpty( personName )) {
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, cb.isMember(personName, root.get(Calendar_.manageablePersonList)));
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, cb.isMember(personName, root.get(Calendar_.publishablePersonList)));
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, cb.isMember(personName, root.get(Calendar_.viewablePersonList)));
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, cb.isMember(personName, root.get(Calendar_.followers)));
+		}
+		if( ListTools.isNotEmpty( unitNames )) {
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, root.get(Calendar_.publishableUnitList).in( unitNames ));
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, root.get(Calendar_.viewableUnitList).in( unitNames ));
+		}
+		if( ListTools.isNotEmpty( groupNames )) {
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, root.get(Calendar_.publishableGroupList).in( groupNames ));
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, root.get(Calendar_.viewableGroupList).in( groupNames ));		
+		}
+		//permission = CriteriaBuilderTools.predicate_or( cb, permission, cb.isTrue( root.get(Calendar_.isPublic) ));
+		p = CriteriaBuilderTools.predicate_and( cb, p, permission );
+		cq.select(root.get(Calendar_.id));
+		
+		return em.createQuery(cq.where(p)).getResultList();
+	}
+	
+	/**
+	 * 查询我自己(可管理)的日历
+	 * @param personName
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listMyCalender( String personName ) throws Exception {
+		EntityManager em = this.entityManagerContainer().get(Calendar.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<String> cq = cb.createQuery(String.class);
+		Root<Calendar> root = cq.from(Calendar.class);
+		Predicate permission = cb.equal( root.get(Calendar_.createor), personName );
+		cq.select(root.get(Calendar_.id));
+		return em.createQuery(cq.where(permission)).getResultList();
+	}
+
+	public List<String> listPublicCalendar() throws Exception {
+		EntityManager em = this.entityManagerContainer().get(Calendar.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<String> cq = cb.createQuery(String.class);
+		Root<Calendar> root = cq.from(Calendar.class);
+		Predicate permission = cb.isTrue( root.get(Calendar_.isPublic) );
+		cq.select(root.get(Calendar_.id));
+		return em.createQuery(cq.where(permission)).getResultList();
+	}	
+}

+ 104 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/factory/Calendar_EventCommentFactory.java

@@ -0,0 +1,104 @@
+package com.x.calendar.assemble.control.factory;
+
+import com.x.base.core.project.tools.ListTools;
+import com.x.calendar.assemble.control.AbstractFactory;
+import com.x.calendar.assemble.control.Business;
+import com.x.calendar.core.entity.*;
+import org.apache.commons.lang3.StringUtils;
+
+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 java.util.Date;
+import java.util.List;
+
+
+/**
+ * 日历备注信息信息表功能服务类
+ * @author O2LEE
+ */
+public class Calendar_EventCommentFactory extends AbstractFactory {
+	
+	public Calendar_EventCommentFactory(Business business) throws Exception {
+		super(business);
+	}
+
+	/**
+	 * 获取指定Id的日历备注信息信息对象
+	 * @param id
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar_EventComment get( String id ) throws Exception {
+		return this.entityManagerContainer().find(id, Calendar_EventComment.class );
+	}
+	
+	/**
+	 * 列示指定Id的日历备注信息信息列表
+	 * @param ids
+	 * @return
+	 * @throws Exception
+	 */
+	public List<Calendar_EventComment> list( List<String> ids ) throws Exception {
+		if( ListTools.isEmpty( ids ) ){
+			return null;
+		}
+		EntityManager em = this.entityManagerContainer().get(Calendar_EventComment.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Calendar_EventComment> cq = cb.createQuery(Calendar_EventComment.class);
+		Root<Calendar_EventComment> root = cq.from(Calendar_EventComment.class);
+		Predicate p = root.get( Calendar_EventComment_.id).in(ids);
+		return em.createQuery(cq.where(p)).getResultList();
+	}
+
+	public Long countEventBundle( String commentId ) throws Exception {
+		if( StringUtils.isEmpty( commentId ) ) {
+			return 0L;
+		}
+		EntityManager em = this.entityManagerContainer().get(Calendar_Event.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Long> cq = cb.createQuery(Long.class);
+		Root<Calendar_Event> root = cq.from(Calendar_Event.class);
+		Predicate p = cb.equal( root.get(Calendar_Event_.commentId ), commentId);
+		cq.select(cb.count(root)).where(p);
+		return em.createQuery(cq.where(p)).getSingleResult();
+	}
+
+	public Long countRepeatMasterBundle( String commentId ) throws Exception {
+		if( StringUtils.isEmpty( commentId ) ) {
+			return 0L;
+		}
+		EntityManager em = this.entityManagerContainer().get(Calendar_EventRepeatMaster.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Long> cq = cb.createQuery(Long.class);
+		Root<Calendar_EventRepeatMaster> root = cq.from(Calendar_EventRepeatMaster.class);
+		Predicate p = cb.equal( root.get( Calendar_EventRepeatMaster_.commentId ), commentId);
+		cq.select(cb.count(root)).where(p);
+		return em.createQuery(cq.where(p)).getSingleResult();
+	}
+
+	/**
+	 * 查询检查时间早于now的maxCount条记录的ID列表
+	 * @param now
+	 * @param maxCount
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listNeedCheckCommnetIds( Date now, Integer maxCount) throws Exception {
+		if( now == null ) {
+			now = new Date();
+		}
+		if( maxCount == null ) {
+			maxCount = 1000;
+		}
+		EntityManager em = this.entityManagerContainer().get(Calendar_EventComment.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<String> cq = cb.createQuery(String.class);
+		Root<Calendar_EventComment> root = cq.from(Calendar_EventComment.class);
+		Predicate p = cb.lessThan( root.get( Calendar_EventComment_.checkTime ), now );
+		cq.select(root.get(Calendar_EventComment_.id));
+		return em.createQuery(cq.where(p)).setMaxResults(maxCount).getResultList();
+	}
+}

+ 244 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/factory/Calendar_EventFactory.java

@@ -0,0 +1,244 @@
+package com.x.calendar.assemble.control.factory;
+
+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 org.apache.commons.lang3.StringUtils;
+
+import com.x.base.core.project.tools.ListTools;
+import com.x.calendar.assemble.control.AbstractFactory;
+import com.x.calendar.assemble.control.Business;
+import com.x.calendar.core.entity.Calendar_Event;
+import com.x.calendar.core.entity.Calendar_Event_;
+import com.x.calendar.core.tools.CriteriaBuilderTools;
+
+
+/**
+ * 日历任务记录信息表功能服务类
+ * @author O2LEE
+ */
+public class Calendar_EventFactory extends AbstractFactory {
+	
+	public Calendar_EventFactory( Business business) throws Exception {
+		super(business);
+	}
+
+	/**
+	 * 获取指定Id的日历任务记录信息对象
+	 * @param id
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar_Event get( String id ) throws Exception {
+		return this.entityManagerContainer().find(id, Calendar_Event.class );
+	}
+	
+	/**
+	 * 列示指定Id的日历任务记录信息列表
+	 * @param ids
+	 * @return
+	 * @throws Exception
+	 */
+	public List<Calendar_Event> list(List<String> ids) throws Exception {
+		if( ListTools.isEmpty( ids ) ){
+			return null;
+		}
+		EntityManager em = this.entityManagerContainer().get(Calendar_Event.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Calendar_Event> cq = cb.createQuery(Calendar_Event.class);
+		Root<Calendar_Event> root = cq.from(Calendar_Event.class);
+		Predicate p = root.get( Calendar_Event_.id).in(ids);
+		return em.createQuery(cq.where(p)).getResultList();
+	}
+	
+	public List<String> listWithCalendarId(String calendarId) throws Exception {
+		if( StringUtils.isEmpty( calendarId ) ){
+			return null;
+		}
+		EntityManager em = this.entityManagerContainer().get(Calendar_Event.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<String> cq = cb.createQuery(String.class);
+		Root<Calendar_Event> root = cq.from(Calendar_Event.class);
+		Predicate p = cb.equal( root.get( Calendar_Event_.calendarId), calendarId);
+		cq.select(root.get(Calendar_Event_.id));
+		return em.createQuery(cq.where(p)).getResultList();
+	}
+
+	/**
+	 * 根据条件查询指定的日历信息ID列表
+	 * @param key
+	 * @param eventType
+	 * @param source
+	 * @param createPerson
+	 * @param calendarIds
+	 * @param personName
+	 * @param unitNames
+	 * @param groupNames
+	 * @param startTime
+	 * @param endTime
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listWithCondition( String key, String eventType, String source, String createPerson, List<String> calendarIds, 
+			String personName, List<String> unitNames, List<String> groupNames, Date startTime, Date endTime ) throws Exception {
+		EntityManager em = this.entityManagerContainer().get(Calendar_Event.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<String> cq = cb.createQuery(String.class);
+		Root<Calendar_Event> root = cq.from(Calendar_Event.class);
+		
+		Predicate p = null;
+		if( ListTools.isNotEmpty( calendarIds )) {
+			p = CriteriaBuilderTools.predicate_and( cb, p, root.get(Calendar_Event_.calendarId).in( calendarIds ));
+		}		
+		if( StringUtils.isNotEmpty( eventType )) {
+			p =CriteriaBuilderTools.predicate_and( cb, p, cb.equal(root.get(Calendar_Event_.eventType), eventType));
+		}
+		if( StringUtils.isNotEmpty( source )) {
+			p =CriteriaBuilderTools.predicate_and( cb, p, cb.equal(root.get(Calendar_Event_.source), source));
+		}
+		if( StringUtils.isNotEmpty( createPerson )) {
+			p =CriteriaBuilderTools.predicate_and( cb, p, cb.equal(root.get(Calendar_Event_.createPerson), createPerson));
+		}
+		if( startTime != null ) {
+			if( endTime == null ) {
+				throw new Exception("endTime is null!");
+			}else {
+				p =CriteriaBuilderTools.predicate_and( cb, p, cb.lessThanOrEqualTo( root.get(Calendar_Event_.startTime), endTime ));
+				p =CriteriaBuilderTools.predicate_and( cb, p, cb.greaterThanOrEqualTo( root.get(Calendar_Event_.endTime), startTime ));
+			}
+		}
+
+		//权限过滤
+		Predicate permission = null;
+		if( StringUtils.isNotEmpty( personName )) {
+			permission =CriteriaBuilderTools.predicate_or( cb, permission, cb.isMember(personName, root.get(Calendar_Event_.manageablePersonList)));
+			permission =CriteriaBuilderTools.predicate_or( cb, permission, cb.isMember(personName, root.get(Calendar_Event_.viewablePersonList)));
+		}
+		if( ListTools.isNotEmpty( unitNames )) {
+			permission =CriteriaBuilderTools.predicate_or( cb, permission, root.get(Calendar_Event_.viewableUnitList).in( unitNames ));
+		}
+		if( ListTools.isNotEmpty( groupNames )) {
+			permission =CriteriaBuilderTools.predicate_or( cb, permission, root.get(Calendar_Event_.viewableGroupList).in( groupNames ));		
+		}
+		if( permission != null ) {
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, cb.isTrue( root.get(Calendar_Event_.isPublic) ) );		
+		}
+		p = CriteriaBuilderTools.predicate_and( cb, p, permission );
+		
+		//模糊搜索
+		Predicate p_key = null;
+		if( StringUtils.isNotEmpty( key )) {
+			p_key = cb.like(root.get(Calendar_Event_.title), key);
+			p_key = CriteriaBuilderTools.predicate_or( cb, p_key, cb.like(root.get(Calendar_Event_.comment), key) );
+		}
+		
+		p = CriteriaBuilderTools.predicate_and( cb, p, p_key );
+		
+		cq.select(root.get(Calendar_Event_.id));
+		
+		return em.createQuery(cq.where(p)).getResultList();
+	}
+	
+	/**
+	 * 根据重复主体以及日期查询指定的日历记录信息ID列表
+	 * @param repeatMasterId
+	 * @param startTime
+	 * @param endTime
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listWithRepeatMaster( String repeatMasterId, Date startTime, Date endTime ) throws Exception {
+		EntityManager em = this.entityManagerContainer().get(Calendar_Event.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<String> cq = cb.createQuery(String.class);
+		Root<Calendar_Event> root = cq.from(Calendar_Event.class);
+		
+		Predicate p = null;
+		if( StringUtils.isNotEmpty( repeatMasterId )) {
+			p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal(root.get(Calendar_Event_.repeatMasterId), repeatMasterId));
+		}
+		if( startTime != null ) {
+			if( endTime == null ) {
+				//查询startTime之后的所有记录
+				p = CriteriaBuilderTools.predicate_and( cb, p, cb.greaterThanOrEqualTo( root.get(Calendar_Event_.startTime), startTime ));
+			}else {
+				p = CriteriaBuilderTools.predicate_and( cb, p, cb.lessThanOrEqualTo( root.get(Calendar_Event_.startTime), endTime ));
+				p = CriteriaBuilderTools.predicate_and( cb, p, cb.greaterThanOrEqualTo( root.get(Calendar_Event_.endTime), startTime ));
+			}
+		}
+		cq.select(root.get(Calendar_Event_.id));
+		return em.createQuery(cq.where(p)).getResultList();
+	}
+
+	public long countWithRepeatMaster(String repeatMasterId) throws Exception {
+		if( StringUtils.isEmpty( repeatMasterId ) ){
+			throw new Exception("repeatMasterId is empty!");
+		}
+		EntityManager em = this.entityManagerContainer().get(Calendar_Event.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Long> cq = cb.createQuery(Long.class);
+		Root<Calendar_Event> root = cq.from(Calendar_Event.class);
+		Predicate p = cb.equal(root.get(Calendar_Event_.repeatMasterId), repeatMasterId);
+		cq.select( cb.count( root ) );
+		return em.createQuery(cq.where(p)).getSingleResult();
+	}
+
+	/**
+	 * 根据开始结束时间以及标题和重复主体ID
+	 * @param calendar_Event
+	 * @return
+	 * @throws Exception
+	 */
+	public boolean eventExists( Calendar_Event calendar_Event ) throws Exception {
+		if( calendar_Event == null  ){
+			throw new Exception("calendar_Event is null!");
+		}
+		EntityManager em = this.entityManagerContainer().get(Calendar_Event.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Long> cq = cb.createQuery(Long.class);
+		Root<Calendar_Event> root = cq.from(Calendar_Event.class);
+		Predicate p = cb.equal(root.get(Calendar_Event_.startTimeStr), calendar_Event.getStartTimeStr() );
+		p = CriteriaBuilderTools.predicate_and(cb, p, cb.equal(root.get(Calendar_Event_.endTimeStr), calendar_Event.getEndTimeStr() ) );
+		p = CriteriaBuilderTools.predicate_and(cb, p, cb.equal(root.get(Calendar_Event_.isAllDayEvent), calendar_Event.getIsAllDayEvent() ) );
+		p = CriteriaBuilderTools.predicate_and(cb, p, cb.equal(root.get(Calendar_Event_.title), calendar_Event.getTitle() ) );
+		if( StringUtils.isNotEmpty( calendar_Event.getRepeatMasterId() )) {
+			p = CriteriaBuilderTools.predicate_and(cb, p, cb.equal(root.get(Calendar_Event_.repeatMasterId), calendar_Event.getRepeatMasterId() ) );
+		}	
+		cq.select( cb.count( root ) );
+		Long count = em.createQuery(cq.where(p)).getSingleResult();
+		if( count > 0 ) {
+			return true;
+		}
+		return false;
+	}
+
+	public List<String> listNeedAlarmEventIds(Date date) throws Exception {
+		EntityManager em = this.entityManagerContainer().get(Calendar_Event.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<String> cq = cb.createQuery(String.class);
+		Root<Calendar_Event> root = cq.from(Calendar_Event.class);
+		Predicate p = cb.lessThanOrEqualTo( root.get(Calendar_Event_.alarmTime), date );
+		p = cb.and( p, cb.isFalse( root.get(Calendar_Event_.alarmAlready ) ));
+		cq.select(root.get(Calendar_Event_.id));
+		return em.createQuery(cq.where(p)).getResultList();
+	}
+
+	public List<String> listWithBundle(String bundle) throws Exception {
+		if( StringUtils.isEmpty( bundle ) ) {
+			throw new Exception("bundle is null!");
+		}
+		EntityManager em = this.entityManagerContainer().get(Calendar_Event.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<String> cq = cb.createQuery(String.class);
+		Root<Calendar_Event> root = cq.from(Calendar_Event.class);
+		Predicate p = cb.equal( root.get(Calendar_Event_.bundle ), bundle);
+		cq.select(root.get(Calendar_Event_.id));
+		return em.createQuery(cq.where(p)).getResultList();
+	}
+}

+ 184 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/factory/Calendar_EventRepeatMasterFactory.java

@@ -0,0 +1,184 @@
+package com.x.calendar.assemble.control.factory;
+
+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 org.apache.commons.lang3.StringUtils;
+
+import com.x.base.core.project.tools.ListTools;
+import com.x.calendar.assemble.control.AbstractFactory;
+import com.x.calendar.assemble.control.Business;
+import com.x.calendar.core.entity.Calendar_EventRepeatMaster;
+import com.x.calendar.core.entity.Calendar_EventRepeatMaster_;
+import com.x.calendar.core.tools.CriteriaBuilderTools;
+
+
+/**
+ * 日历任务记录信息表功能服务类
+ * @author O2LEE
+ */
+public class Calendar_EventRepeatMasterFactory extends AbstractFactory {
+	
+	public Calendar_EventRepeatMasterFactory( Business business) throws Exception {
+		super(business);
+	}
+
+	/**
+	 * 获取指定Id的日历任务记录信息对象
+	 * @param id
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar_EventRepeatMaster get( String id ) throws Exception {
+		return this.entityManagerContainer().find(id, Calendar_EventRepeatMaster.class );
+	}
+	
+	/**
+	 * 列示指定Id的日历任务记录信息列表
+	 * @param ids
+	 * @return
+	 * @throws Exception
+	 */
+	public List<Calendar_EventRepeatMaster> list(List<String> ids) throws Exception {
+		if( ListTools.isEmpty( ids ) ){
+			return null;
+		}
+		EntityManager em = this.entityManagerContainer().get(Calendar_EventRepeatMaster.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Calendar_EventRepeatMaster> cq = cb.createQuery(Calendar_EventRepeatMaster.class);
+		Root<Calendar_EventRepeatMaster> root = cq.from(Calendar_EventRepeatMaster.class);
+		Predicate p = root.get( Calendar_EventRepeatMaster_.id).in(ids);
+		return em.createQuery(cq.where(p)).getResultList();
+	}
+	
+	public List<String> listWithCalendarId(String calendarId) throws Exception {
+		if( StringUtils.isEmpty( calendarId ) ){
+			return null;
+		}
+		EntityManager em = this.entityManagerContainer().get(Calendar_EventRepeatMaster.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<String> cq = cb.createQuery(String.class);
+		Root<Calendar_EventRepeatMaster> root = cq.from(Calendar_EventRepeatMaster.class);
+		Predicate p = cb.equal( root.get( Calendar_EventRepeatMaster_.calendarId), calendarId);
+		cq.select(root.get(Calendar_EventRepeatMaster_.id));
+		return em.createQuery(cq.where(p)).getResultList();
+	}
+
+	/**
+	 * 根据条件查询指定的日历信息ID列表
+	 * @param title
+	 * @param eventType
+	 * @param source
+	 * @param createPerson
+	 * @param inFilterCalendarIds
+	 * @param personName
+	 * @param unitNames
+	 * @param groupNames
+	 * @param startDate
+	 * @param endDate
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listWithCondition( String title, String eventType, String source, String createPerson, List<String> inFilterCalendarIds, 
+			 String personName, List<String> unitNames, List<String> groupNames, Date startTime, Date endTime ) throws Exception {
+		EntityManager em = this.entityManagerContainer().get(Calendar_EventRepeatMaster.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<String> cq = cb.createQuery(String.class);
+		Root<Calendar_EventRepeatMaster> root = cq.from(Calendar_EventRepeatMaster.class);
+		
+		Predicate p = null;
+		if( ListTools.isNotEmpty( inFilterCalendarIds )) {
+			p = CriteriaBuilderTools.predicate_and( cb, p, root.get(Calendar_EventRepeatMaster_.calendarId).in( inFilterCalendarIds ));
+		}
+		if( StringUtils.isNotEmpty( title )) {
+			p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal(root.get(Calendar_EventRepeatMaster_.title), title));
+		}
+		if( StringUtils.isNotEmpty( eventType )) {
+			p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal(root.get(Calendar_EventRepeatMaster_.eventType), eventType));
+		}
+		if( StringUtils.isNotEmpty( source )) {
+			p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal(root.get(Calendar_EventRepeatMaster_.source), source));
+		}
+		if( StringUtils.isNotEmpty( createPerson )) {
+			p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal(root.get(Calendar_EventRepeatMaster_.createPerson), createPerson));
+		}
+		if( startTime != null ) {
+			if( endTime == null ) {
+				throw new Exception("endTime is null!");
+			}else {
+				p = CriteriaBuilderTools.predicate_and( cb, p, cb.lessThanOrEqualTo( root.get(Calendar_EventRepeatMaster_.startTime), endTime ));
+				p = CriteriaBuilderTools.predicate_and( cb, p, cb.greaterThanOrEqualTo( root.get(Calendar_EventRepeatMaster_.endTime), startTime ));
+			}
+		}
+		Predicate permission = null;
+		if( StringUtils.isNotEmpty( personName )) {
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, cb.isMember(personName, root.get(Calendar_EventRepeatMaster_.manageablePersonList)));
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, cb.isMember(personName, root.get(Calendar_EventRepeatMaster_.viewablePersonList)));
+		}
+		if( ListTools.isNotEmpty( unitNames )) {
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, root.get(Calendar_EventRepeatMaster_.viewableUnitList).in( unitNames ));
+		}
+		if( ListTools.isNotEmpty( groupNames )) {
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, root.get(Calendar_EventRepeatMaster_.viewableGroupList).in( groupNames ));		
+		}		
+		p = CriteriaBuilderTools.predicate_and( cb, p, permission );
+		cq.select(root.get(Calendar_EventRepeatMaster_.id));
+		return em.createQuery(cq.where(p)).getResultList();
+	}
+
+	/**
+	 * 查询需要生成日历事件的重复主体信息ID列表
+	 * @param calendarIds
+	 * @param eventType
+	 * @param createMonth
+	 * @param personName
+	 * @param unitNames
+	 * @param groupNames
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listNeedRepeatMaster(List<String> calendarIds, String eventType, String createMonth,
+			String personName, List<String> unitNames, List<String> groupNames) throws Exception {
+		EntityManager em = this.entityManagerContainer().get(Calendar_EventRepeatMaster.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<String> cq = cb.createQuery(String.class);
+		Root<Calendar_EventRepeatMaster> root = cq.from(Calendar_EventRepeatMaster.class);
+		
+		Predicate p = cb.equal( root.get(Calendar_EventRepeatMaster_.repeatStatus ), "等待生成" );
+		
+		if( ListTools.isNotEmpty( calendarIds )) {
+			p = CriteriaBuilderTools.predicate_and( cb, p, root.get(Calendar_EventRepeatMaster_.calendarId).in( calendarIds ));
+		}
+		if( StringUtils.isNotEmpty( eventType )) {
+			p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal(root.get(Calendar_EventRepeatMaster_.eventType), eventType));
+		}
+		if( StringUtils.isNotEmpty( createMonth )) {
+			p = CriteriaBuilderTools.predicate_and( cb, p, 
+					cb.isNotMember( createMonth, root.get(Calendar_EventRepeatMaster_.createdMonthList) )
+			);
+		}
+		
+		Predicate permission = null;
+		if( StringUtils.isNotEmpty( personName )) {
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, cb.isMember(personName, root.get(Calendar_EventRepeatMaster_.manageablePersonList)));
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, cb.isMember(personName, root.get(Calendar_EventRepeatMaster_.viewablePersonList)));
+		}
+		if( ListTools.isNotEmpty( unitNames )) {
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, root.get(Calendar_EventRepeatMaster_.viewableUnitList).in( unitNames ));
+		}
+		if( ListTools.isNotEmpty( groupNames )) {
+			permission = CriteriaBuilderTools.predicate_or( cb, permission, root.get(Calendar_EventRepeatMaster_.viewableGroupList).in( groupNames ));		
+		}
+		
+		p = CriteriaBuilderTools.predicate_and( cb, p, permission );
+		cq.select(root.get(Calendar_EventRepeatMaster_.id));
+		
+		return em.createQuery(cq.distinct(true).where(p)).getResultList();
+	}
+}

+ 114 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/factory/Calendar_SettingFactory.java

@@ -0,0 +1,114 @@
+package com.x.calendar.assemble.control.factory;
+
+import java.util.ArrayList;
+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.calendar.assemble.control.AbstractFactory;
+import com.x.calendar.assemble.control.Business;
+import com.x.calendar.core.entity.Calendar_Setting;
+import com.x.calendar.core.entity.Calendar_Setting_;
+
+
+/**
+ * 系统配置信息表基础功能服务类
+ * @author O2LEE
+ */
+public class Calendar_SettingFactory extends AbstractFactory {
+	
+	public Calendar_SettingFactory( Business business) throws Exception {
+		super(business);
+	}
+
+	/**
+	 * 获取指定Id的Calendar_Setting配置信息对象
+	 * @param id
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar_Setting get( String id ) throws Exception {
+		return this.entityManagerContainer().find(id, Calendar_Setting.class, ExceptionWhen.none);
+	}
+	
+	/**
+	 * 列示全部的Calendar_Setting配置信息列表
+	 * @return
+	 * @throws Exception
+	 */
+	@SuppressWarnings("unused")
+	public List<Calendar_Setting> listAll() throws Exception {
+		EntityManager em = this.entityManagerContainer().get(Calendar_Setting.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Calendar_Setting> cq = cb.createQuery(Calendar_Setting.class);
+		Root<Calendar_Setting> root = cq.from( Calendar_Setting.class);
+		return em.createQuery(cq).getResultList();
+	}
+	
+	/**
+	 * 列示指定Id的Calendar_Setting配置信息列表
+	 * @param ids
+	 * @return
+	 * @throws Exception
+	 */
+	public List<Calendar_Setting> list(List<String> ids) throws Exception {
+		if( ids == null || ids.size() == 0 ){
+			return new ArrayList<Calendar_Setting>();
+		}
+		EntityManager em = this.entityManagerContainer().get(Calendar_Setting.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Calendar_Setting> cq = cb.createQuery(Calendar_Setting.class);
+		Root<Calendar_Setting> root = cq.from(Calendar_Setting.class);
+		Predicate p = root.get( Calendar_Setting_.id).in(ids);
+		return em.createQuery(cq.where(p)).getResultList();
+	}
+	
+	/**
+	 * 根据CODE列示指定Id的Calendar_Setting配置信息列表
+	 * @param code
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listIdsByCode(String code) throws Exception {
+		if( code == null || code.isEmpty() ){
+			return null;
+		}
+		EntityManager em = this.entityManagerContainer().get(Calendar_Setting.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<String> cq = cb.createQuery(String.class);
+		Root<Calendar_Setting> root = cq.from(Calendar_Setting.class);
+		Predicate p = cb.equal(root.get(Calendar_Setting_.configCode),  code);
+		cq.select(root.get(Calendar_Setting_.id));
+		return em.createQuery(cq.where(p)).getResultList();
+	}
+
+	/**
+	 * 根据配置编码查询配置信息对象
+	 * @param configCode
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar_Setting getWithConfigCode( String configCode ) throws Exception {
+		if( configCode == null || configCode.isEmpty() ){
+			return null;
+		}
+		Calendar_Setting attendanceSetting = null;
+		List<Calendar_Setting> settingList = null;
+		EntityManager em = this.entityManagerContainer().get(Calendar_Setting.class);
+		CriteriaBuilder cb = em.getCriteriaBuilder();
+		CriteriaQuery<Calendar_Setting> cq = cb.createQuery(Calendar_Setting.class);
+		Root<Calendar_Setting> root = cq.from(Calendar_Setting.class);
+		Predicate p = cb.equal(root.get( Calendar_Setting_.configCode ),  configCode );
+		settingList = em.createQuery(cq.where(p)).getResultList();
+		if( settingList != null && settingList.size() > 0 ){
+			attendanceSetting = settingList.get(0);
+		}
+		return attendanceSetting;
+	}
+	
+}

+ 27 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/factory/MessageFactory.java

@@ -0,0 +1,27 @@
+package com.x.calendar.assemble.control.factory;
+
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.entity.annotation.CheckPersistType;
+import com.x.base.core.project.message.MessageConnector;
+import com.x.base.core.project.tools.ListTools;
+import com.x.calendar.core.entity.Calendar_Event;
+import com.x.calendar.core.tools.LogUtil;
+
+public class MessageFactory {
+
+	public static void send_alarm( EntityManagerContainer emc, Calendar_Event event ) throws Exception {
+		LogUtil.INFO( "send calendar alarm message", event.getTitle() + ", StartTime: " + event.getStartTimeStr() );
+		if( ListTools.isNotEmpty( event.getParticipants() )) {
+			for( String participant : event.getParticipants() ) {
+				MessageConnector.send( MessageConnector.TYPE_CALENDAR_ALARM, "日程提醒:"+event.getTitle(), participant, event );
+			}
+		}
+		
+		event = emc.find( event.getId(), Calendar_Event.class );
+		emc.beginTransaction( Calendar_Event.class );
+		event.setAlarmAlready( true );
+		emc.check( event, CheckPersistType.all );
+		emc.commit();
+	}
+	
+}

+ 25 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/ActionApplication.java

@@ -0,0 +1,25 @@
+package com.x.calendar.assemble.control.jaxrs;
+
+import java.util.Set;
+
+import javax.ws.rs.ApplicationPath;
+
+import com.x.base.core.project.jaxrs.AbstractActionApplication;
+import com.x.calendar.assemble.control.jaxrs.calendar.CalendarAction;
+import com.x.calendar.assemble.control.jaxrs.event.Calendar_EventAction;
+import com.x.calendar.assemble.control.jaxrs.event.Calendar_EventMessageAction;
+import com.x.calendar.assemble.control.jaxrs.setting.CalendarSettingAction;
+
+@ApplicationPath("jaxrs")
+public class ActionApplication extends AbstractActionApplication {
+
+	public Set<Class<?>> getClasses() {
+
+		this.classes.add(CalendarSettingAction.class);
+		this.classes.add(Calendar_EventAction.class);
+		this.classes.add(CalendarAction.class);
+		this.classes.add(Calendar_EventMessageAction.class);
+		return this.classes;
+	}
+
+}

+ 17 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/CalendarJaxrsCipherFilter.java

@@ -0,0 +1,17 @@
+package com.x.calendar.assemble.control.jaxrs;
+
+import javax.servlet.annotation.WebFilter;
+
+import com.x.base.core.project.jaxrs.CipherJaxrsFilter;
+
+/**
+ * web服务过滤器,将指定的URL定义为需要用户认证的服务,如果用户未登录,则无法访问该服务
+ * 
+ * @author O2LEE *
+ */
+@WebFilter(urlPatterns = {
+	"/jaxrs/message/*"
+}, asyncSupported = true )
+public class CalendarJaxrsCipherFilter extends CipherJaxrsFilter {
+
+}

+ 19 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/CalendarJaxrsFilter.java

@@ -0,0 +1,19 @@
+package com.x.calendar.assemble.control.jaxrs;
+
+import javax.servlet.annotation.WebFilter;
+
+import com.x.base.core.project.jaxrs.ManagerUserJaxrsFilter;
+
+/**
+ * web服务过滤器,将指定的URL定义为需要用户认证的服务,如果用户未登录,则无法访问该服务
+ * 
+ * @author O2LEE *
+ */
+@WebFilter(urlPatterns = {
+	"/jaxrs/calendar/*",
+	"/jaxrs/setting/*",
+	"/jaxrs/event/*"
+}, asyncSupported = true )
+public class CalendarJaxrsFilter extends ManagerUserJaxrsFilter {
+
+}

+ 15 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/MessageJaxrsFilter.java

@@ -0,0 +1,15 @@
+package com.x.calendar.assemble.control.jaxrs;
+
+import javax.servlet.annotation.WebFilter;
+
+import com.x.base.core.project.jaxrs.CipherManagerJaxrsFilter;
+
+/**
+ * web服务过滤器,将指定的URL定义为需要用户认证的服务,如果用户未登录,则无法访问该服务
+ * 
+ * @author O2LEE *
+ */
+@WebFilter(urlPatterns = { "/jaxrs/message/*" }, asyncSupported = true)
+public class MessageJaxrsFilter extends CipherManagerJaxrsFilter {
+
+}

+ 15 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/TestJaxrsFilter.java

@@ -0,0 +1,15 @@
+package com.x.calendar.assemble.control.jaxrs;
+
+import javax.servlet.annotation.WebFilter;
+
+import com.x.base.core.project.jaxrs.AnonymousCipherManagerUserJaxrsFilter;
+
+/**
+ * web服务过滤器,将指定的URL定义为需要用户认证的服务,如果用户未登录,则无法访问该服务
+ * 
+ * @author O2LEE *
+ */
+@WebFilter(urlPatterns = { "/jaxrs/test/*" }, asyncSupported = true)
+public class TestJaxrsFilter extends AnonymousCipherManagerUserJaxrsFilter {
+
+}

+ 67 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionDelete.java

@@ -0,0 +1,67 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+import com.x.base.core.project.annotation.AuditLog;
+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.calendar.core.entity.Calendar;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+
+public class ActionDelete extends BaseAction {
+	
+	private Logger logger = LoggerFactory.getLogger( ActionDelete.class );
+
+	@AuditLog(operation = "删除日历")
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id ) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Calendar calendar = null;
+		Boolean check = true;
+		
+		if( check ){
+			if( StringUtils.isEmpty( id ) ){
+				check = false;
+				Exception exception = new ExceptionCalendarIdEmpty();
+				result.error( exception );
+			}
+		}
+
+		if( check ){
+			try {
+				calendar = calendarServiceAdv.get( id );
+				if( calendar == null ) {
+					check = false;
+					Exception exception = new ExceptionCalendarNotExists( id );
+					result.error( exception );
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "系统根据ID查询指定日历信息时发生异常.ID:" + id );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		if( check ){
+			try {
+				calendarServiceAdv.destory( id );
+				Wo wo = new Wo();
+				wo.setId( id );
+				result.setData( wo );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "系统根据ID删除指定日历信息时发生异常时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		return result;
+	}
+
+	public static class Wo extends WoId  {
+	
+	}
+
+}

+ 80 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionFollowCalendar.java

@@ -0,0 +1,80 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+import com.x.base.core.project.annotation.AuditLog;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.http.WrapOutBoolean;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.calendar.core.entity.Calendar;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * 关注一个公开的日历(非公开的日历不允许被关注)
+ * 
+ * @author O2LEE
+ *
+ */
+public class ActionFollowCalendar extends BaseAction {
+	
+	private Logger logger = LoggerFactory.getLogger( ActionFollowCalendar.class );
+
+	@AuditLog(operation = "关注日历")
+	protected ActionResult<WrapOutBoolean> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id ) throws Exception {
+		ActionResult<WrapOutBoolean> result = new ActionResult<>();
+		Wo wo = new Wo();
+		Calendar calendar = null;
+		Boolean check = true;
+		
+		if( check ){
+			if( StringUtils.isEmpty( id ) ){
+				check = false;
+				Exception exception = new ExceptionCalendarIdEmpty();
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			try {
+				calendar = calendarServiceAdv.get( id );
+				if( calendar == null ) {
+					check = false;
+					Exception exception = new ExceptionCalendarNotExists( id );
+					result.error( exception );
+				}else {
+					if( !calendar.getIsPublic() ) {
+						check = false;
+						Exception exception = new ExceptionCalendarInfoProcess( "日历信息未公开,不允许被关注!" );
+						result.error( exception );
+					}
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "系统根据ID查询指定日历信息时发生异常.ID:" + id );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			try {
+				check = calendarServiceAdv.follow( effectivePerson, id );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "系统根据ID关注指定日历信息时发生异常.ID:" + id );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		wo.setValue( check );
+		result.setData(wo);
+		return result;
+	}
+
+	public static class Wo extends WrapOutBoolean  {
+	}
+
+}

+ 56 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionFollowCalendarCancel.java

@@ -0,0 +1,56 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+import com.x.base.core.project.annotation.AuditLog;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.http.WrapOutBoolean;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * 取消关注一个公开的日历
+ * 
+ * @author O2LEE
+ *
+ */
+public class ActionFollowCalendarCancel extends BaseAction {
+	
+	private Logger logger = LoggerFactory.getLogger( ActionFollowCalendarCancel.class );
+
+	@AuditLog(operation = "取消关注日历")
+	protected ActionResult<WrapOutBoolean> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id ) throws Exception {
+		ActionResult<WrapOutBoolean> result = new ActionResult<>();
+		Wo wo = new Wo();
+		Boolean check = true;
+		
+		if( check ){
+			if( StringUtils.isEmpty( id ) ){
+				check = false;
+				Exception exception = new ExceptionCalendarIdEmpty();
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			try {
+				check = calendarServiceAdv.followCancel( effectivePerson, id );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "系统根据ID取消对指定日历信息的关注时发生异常.ID:" + id );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		wo.setValue( check );
+		result.setData(wo);
+		return result;
+	}
+
+	public static class Wo extends WrapOutBoolean  {
+	}
+
+}

+ 115 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionGet.java

@@ -0,0 +1,115 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.lang3.StringUtils;
+
+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.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.calendar.assemble.control.ThisApplication;
+import com.x.calendar.core.entity.Calendar;
+
+public class ActionGet extends BaseAction {
+	
+	private Logger logger = LoggerFactory.getLogger( ActionGet.class );
+	
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id ) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wo wrap = null;
+		Calendar calendar = null;
+		Boolean check = true;
+		List<String> unitNames = null;
+		List<String> groupNames = null;
+		String personName = effectivePerson.getDistinguishedName();
+		
+		if( check ){
+			if( StringUtils.isEmpty( id ) ){
+				check = false;
+				Exception exception = new ExceptionCalendarIdEmpty();
+				result.error( exception );
+			}
+		}
+
+		if( check ){
+			try {
+				unitNames = userManagerService.listUnitNamesWithPerson(personName);
+				groupNames = userManagerService.listGroupNamesByPerson(personName);
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "系统根据用户查询组织和群组信息列表时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			try {
+				calendar = calendarServiceAdv.get( id );
+				if( calendar == null ) {
+					check = false;
+					Exception exception = new ExceptionCalendarNotExists( id );
+					result.error( exception );
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "系统根据ID查询指定日历信息时发生异常.ID:" + id );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		if( check ){
+			try {
+				wrap = Wo.copier.copy( calendar );
+				wrap.setManageable( ThisApplication.isCalendarManager( effectivePerson, wrap ) );
+				wrap.setPublishable( ThisApplication.isCalendarPublisher( effectivePerson, unitNames, groupNames, wrap ) );	
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "将所有查询到的日历信息对象转换为可以输出的信息时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		result.setData( wrap );
+		return result;
+	}
+
+	public static class Wo extends Calendar  {
+		
+		@FieldDescribe("用户是否可以对该日历进行管理.")
+		private Boolean manageable = false;
+		
+		@FieldDescribe("用户是否可以在该日历中发布日程事件.")
+		private Boolean publishable = false;
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>();
+		
+		public static WrapCopier<Calendar, Wo> copier = WrapCopierFactory.wo( Calendar.class, Wo.class, null,Wo.Excludes);
+
+		public Boolean getManageable() {
+			return manageable;
+		}
+
+		public Boolean getPublishable() {
+			return publishable;
+		}
+
+		public void setManageable(Boolean manageable) {
+			this.manageable = manageable;
+		}
+
+		public void setPublishable(Boolean publishable) {
+			this.publishable = publishable;
+		}		
+	}
+
+}

+ 57 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionIsCalendarManager.java

@@ -0,0 +1,57 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+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.http.WrapOutBoolean;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.calendar.assemble.control.ThisApplication;
+import com.x.calendar.core.entity.Calendar;
+
+public class ActionIsCalendarManager extends BaseAction {
+	
+	private Logger logger = LoggerFactory.getLogger( ActionIsCalendarManager.class );
+	
+	protected ActionResult<WrapOutBoolean> execute( HttpServletRequest request, EffectivePerson effectivePerson, String accountId ) throws Exception {
+		ActionResult<WrapOutBoolean> result = new ActionResult<>();
+		Wo wo = new Wo();
+		Calendar calendar = null;
+		Boolean check = true;
+		
+		if( check ){
+			if( StringUtils.isEmpty( accountId ) ){
+				check = false;
+				Exception exception = new ExceptionCalendarIdEmpty();
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			try {
+				calendar = calendarServiceAdv.get( accountId );
+				if( calendar == null ) {
+					check = false;
+					Exception exception = new ExceptionCalendarNotExists( accountId );
+					result.error( exception );
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "系统根据ID查询指定日历信息时发生异常.ID:" + accountId );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		wo.setValue( ThisApplication.isCalendarManager( effectivePerson, calendar ) );
+		result.setData(wo);
+		return result;
+	}
+
+	public static class Wo extends WrapOutBoolean  {
+	}
+
+}

+ 36 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionIsManager.java

@@ -0,0 +1,36 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+import javax.servlet.http.HttpServletRequest;
+
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.http.WrapOutBoolean;
+
+public class ActionIsManager extends BaseAction {
+	
+	protected ActionResult<WrapOutBoolean> execute( HttpServletRequest request, EffectivePerson effectivePerson ) throws Exception {
+		ActionResult<WrapOutBoolean> result = new ActionResult<>();
+		Wo wo = new Wo();
+		Boolean manager = false;
+		Boolean check = true;
+		
+		if( check ) {
+			if(effectivePerson.isManager()) {
+				manager = true;
+			}else {
+				try {
+					manager = userManagerService.isManager( request, effectivePerson );
+				}catch( Exception e) {
+					e.printStackTrace();
+				}
+			}
+		}		
+		wo.setValue( manager );
+		result.setData(wo);
+		return result;
+	}
+
+	public static class Wo extends WrapOutBoolean  {
+	}
+
+}

+ 130 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionListPublicCalendar.java

@@ -0,0 +1,130 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+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.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.calendar.assemble.control.ThisApplication;
+import com.x.calendar.core.entity.Calendar;
+
+/**
+ * 列示所有公开的日历信息
+ * 
+ * @author O2LEE
+ *
+ */
+public class ActionListPublicCalendar extends BaseAction {
+	
+	private Logger logger = LoggerFactory.getLogger( ActionListPublicCalendar.class );
+	
+	protected ActionResult<List<Wo>> execute( HttpServletRequest request, EffectivePerson effectivePerson ) throws Exception {
+		ActionResult<List<Wo>> result = new ActionResult<>();
+		List<Wo> wraps = null;
+		List<Calendar> calendarList = null;
+		Boolean check = true;
+		List<String> ids = null;
+		List<String> unitNames = null;
+		List<String> groupNames = null;
+		String personName = effectivePerson.getDistinguishedName();
+		
+		if( check ){
+			try {
+				unitNames = userManagerService.listUnitNamesWithPerson(personName);
+				groupNames = userManagerService.listGroupNamesByPerson(personName);
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "系统根据用户查询组织和群组信息列表时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}			
+		}
+		
+		if( check ){
+			try {
+				ids = calendarServiceAdv.listPublicCalendar();
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "系统查询所有公开的日历信息ID列表时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			if( ListTools.isNotEmpty( ids )) {
+				calendarList = calendarServiceAdv.list(ids);
+				try {
+					wraps = Wo.copier.copy( calendarList );
+					if( ListTools.isNotEmpty( wraps )) {
+						for( Wo wo : wraps ) {
+							if( ListTools.isNotEmpty( wo.getFollowers() ) && wo.getFollowers().contains( effectivePerson.getDistinguishedName() )) {
+								wo.setFollowed( true );
+							}
+							wo.setManageable( ThisApplication.isCalendarManager( effectivePerson, wo ) );
+							wo.setPublishable( ThisApplication.isCalendarPublisher( effectivePerson, unitNames, groupNames, wo ) );	
+						}
+					}
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionCalendarInfoProcess( e, "将所有查询到的日历信息对象转换为可以输出的信息时发生异常." );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}
+		}
+		result.setData(wraps);
+		return result;
+	}	
+	
+	
+	public static class Wo extends Calendar  {
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>();
+		
+		@FieldDescribe("用户是否可以对该日历进行管理.")
+		private Boolean manageable = false;
+		
+		@FieldDescribe("用户是否可以在该日历中发布日程事件.")
+		private Boolean publishable = false;
+		
+		@FieldDescribe("用户是否已经关注.")
+		private Boolean followed = false;
+		
+		public static WrapCopier<Calendar, Wo> copier = WrapCopierFactory.wo( Calendar.class, Wo.class, null,Wo.Excludes);
+
+		public Boolean getManageable() {
+			return manageable;
+		}
+
+		public Boolean getPublishable() {
+			return publishable;
+		}
+
+		public void setManageable(Boolean manageable) {
+			this.manageable = manageable;
+		}
+
+		public void setPublishable(Boolean publishable) {
+			this.publishable = publishable;
+		}
+
+		public Boolean getFollowed() {
+			return followed;
+		}
+
+		public void setFollowed(Boolean followed) {
+			this.followed = followed;
+		}		
+	}
+}

+ 206 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionListWhatICanView.java

@@ -0,0 +1,206 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+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.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.calendar.assemble.control.ThisApplication;
+import com.x.calendar.core.entity.Calendar;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 列示所有我能访问到的日历信息
+ * 
+ * @author O2LEE
+ *
+ */
+public class ActionListWhatICanView extends BaseAction {
+	
+	private Logger logger = LoggerFactory.getLogger( ActionListWhatICanView.class );
+
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson ) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wo wo = new Wo();
+		List<Calendar> calendarList = null;
+		Boolean check = true;
+		List<String> ids = null;
+		
+		List<String> unitNames = null;
+		List<String> groupNames = null;
+		String personName = effectivePerson.getDistinguishedName();
+
+		if( check ){
+			try {
+				unitNames = userManagerService.listUnitNamesWithPerson(personName);
+				groupNames = userManagerService.listGroupNamesByPerson(personName);
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "系统根据用户查询组织和群组信息列表时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}			
+		}
+		
+		if( check ){
+			try {
+				ids = calendarServiceAdv.listWithCondition( personName, unitNames, groupNames );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "系统根据用户权限查询日历信息ID列表时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			if( ListTools.isNotEmpty( ids )) {
+				calendarList = calendarServiceAdv.list(ids);
+			}
+		}
+		
+		if( check ){
+			if( ListTools.isNotEmpty( calendarList )) {
+				result.setCount( Long.parseLong( calendarList.size() + "" ));
+				WoCalendar woCalendar = null;
+				for( Calendar calendar : calendarList ) {
+					woCalendar = WoCalendar.copier.copy( calendar ) ;
+					woCalendar.setManageable( ThisApplication.isCalendarManager( effectivePerson, calendar ) );
+					woCalendar.setPublishable( ThisApplication.isCalendarPublisher( effectivePerson, unitNames, groupNames, calendar ) );	
+					//将所有的日历分为三类,放在三个不同的LIST里
+					//组织日历
+					if( "UNIT".equalsIgnoreCase( calendar.getType() ) ) {
+						wo.addUnitCalendar( woCalendar );
+					}else {
+						if( calendar.getCreateor().equalsIgnoreCase( effectivePerson.getDistinguishedName() )) {
+							wo.addMyCalendar( woCalendar );
+						}else {
+							wo.addFollowCalendar( woCalendar );
+						}
+					}
+				}
+			}
+		}
+		result.setData(wo);
+		return result;
+	}
+	
+	public static class Wo {
+		
+		@FieldDescribe("我创建的个人日历列表.")
+		private List<WoCalendar>  myCalendars = new ArrayList<>();
+		
+		@FieldDescribe("可见的组织日历列表.")
+		private List<WoCalendar>  unitCalendars = new ArrayList<>();
+		
+		@FieldDescribe("关注的日历列表.")
+		private List<WoCalendar>  followCalendars = new ArrayList<>();
+
+		public List<WoCalendar> getMyCalendars() {
+			return myCalendars;
+		}
+
+		public List<WoCalendar> getUnitCalendars() {
+			return unitCalendars;
+		}
+
+		public List<WoCalendar> getFollowCalendars() {
+			return followCalendars;
+		}
+
+		public void setMyCalendars(List<WoCalendar> myCalendars) {
+			this.myCalendars = myCalendars;
+		}
+
+		public void setUnitCalendars(List<WoCalendar> unitCalendars) {
+			this.unitCalendars = unitCalendars;
+		}
+
+		public void setFollowCalendars(List<WoCalendar> followCalendars) {
+			this.followCalendars = followCalendars;
+		}
+		
+		public void addMyCalendar( WoCalendar calendar ) {
+			if( this.myCalendars == null ) {
+				this.myCalendars = new ArrayList<>();
+			}
+			this.myCalendars.add( calendar );
+		}
+		
+		public void addUnitCalendar( WoCalendar calendar ) {
+			if( this.unitCalendars == null ) {
+				this.unitCalendars = new ArrayList<>();
+			}
+			this.unitCalendars.add( calendar );
+		}
+		
+		public void addFollowCalendar( WoCalendar calendar ) {
+			if( this.followCalendars == null ) {
+				this.followCalendars = new ArrayList<>();
+			}
+			this.followCalendars.add( calendar );
+		}
+		
+	}
+	
+	
+	public static class WoCalendar extends Calendar  {
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>();
+		
+		static {
+			Excludes.add(  JpaObject.sequence_FIELDNAME );
+			Excludes.add( "updateTime" );
+			Excludes.add( "manageablePersonList" );
+			Excludes.add( "viewablePersonList" );
+			Excludes.add( "viewableUnitList" );
+			Excludes.add( "viewableGroupList" );
+			Excludes.add( "publishablePersonList" );
+			Excludes.add( "publishableUnitList" );
+			Excludes.add( "publishableGroupList" );
+			Excludes.add( "status" );
+			Excludes.add( "distributeFactor" );
+			Excludes.add( "isPublic" );
+			Excludes.add( "followers" );
+			Excludes.add( "description" );
+			Excludes.add( "target" );
+			Excludes.add( "createor" );
+			Excludes.add( "source" );
+			Excludes.add( "createTime" );		
+		}
+		
+		@FieldDescribe("用户是否可以对该日历进行管理.")
+		private Boolean manageable = false;
+		
+		@FieldDescribe("用户是否可以在该日历中发布日程事件.")
+		private Boolean publishable = false;
+		
+		public static WrapCopier<Calendar, WoCalendar> copier = WrapCopierFactory.wo( Calendar.class, WoCalendar.class, null,WoCalendar.Excludes);
+
+		public Boolean getManageable() {
+			return manageable;
+		}
+
+		public void setManageable(Boolean manageable) {
+			this.manageable = manageable;
+		}
+
+		public Boolean getPublishable() {
+			return publishable;
+		}
+
+		public void setPublishable(Boolean publishable) {
+			this.publishable = publishable;
+		}
+		
+	}
+}

+ 190 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionListWithCondition.java

@@ -0,0 +1,190 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import com.google.gson.JsonElement;
+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.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.calendar.assemble.control.ExceptionWrapInConvert;
+import com.x.calendar.assemble.control.ThisApplication;
+import com.x.calendar.core.entity.Calendar;
+
+/**
+ * 根据条件和权限列示能访问到的符合条件的日历信息
+ * @author O2LEE
+ *
+ */
+public class ActionListWithCondition extends BaseAction {
+	
+	private Logger logger = LoggerFactory.getLogger( ActionListWithCondition.class );
+	
+	protected ActionResult<List<Wo>> execute( HttpServletRequest request, EffectivePerson effectivePerson,  JsonElement jsonElement) throws Exception {
+		ActionResult<List<Wo>> result = new ActionResult<>();
+		Wi wi = null;
+		List<Wo> wraps = null;
+		List<Calendar> calendarList = null;
+		Boolean check = true;
+		//Boolean manager = false;
+		List<String> unitNames = null;
+		List<String> groupNames = null;
+		String personName = effectivePerson.getDistinguishedName();
+		List<String> ids = null;
+		
+		if( check ){
+			try {
+				unitNames = userManagerService.listUnitNamesWithPerson(personName);
+				groupNames = userManagerService.listGroupNamesByPerson(personName);
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "系统根据用户查询组织和群组信息列表时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}			
+		}
+		
+
+		try {
+			wi = this.convertToWrapIn( jsonElement, Wi.class );
+		} catch (Exception e ) {
+			check = false;
+			Exception exception = new ExceptionWrapInConvert( e, jsonElement );
+			result.error( exception );
+			logger.error( e, effectivePerson, request, null);
+		}
+		
+//		try {
+//			manager = ThisApplication.isCalendarSystemManager(effectivePerson);
+//		} catch (Exception e) {
+//			check = false;
+//			Exception exception = new ExceptionCalendarInfoProcess(e, "系统在检查用户是否是平台管理员时发生异常。Name:" + personName);
+//			result.error(exception);
+//			logger.error(e, effectivePerson, request, null);
+//		}
+		
+		if( check ){
+			try {
+				ids = calendarServiceAdv.listWithCondition( wi.getName(), wi.getType(), wi.getSource(), wi.getCreateor(), null, personName, 
+						unitNames, groupNames );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "系统根据条件查询指定的日历信息ID列表时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+//			if( manager) { //不带权限
+//				try {
+//					ids = calendarServiceAdv.listWithCondition( wi.getName(), wi.getType(), wi.getSource(), wi.getCreateor(), null );
+//				} catch (Exception e) {
+//					check = false;
+//					Exception exception = new ExceptionCalendarInfoProcess( e, "系统根据条件查询指定的日历信息ID列表(忽略权限)时发生异常." );
+//					result.error( exception );
+//					logger.error( e, effectivePerson, request, null);
+//				}
+//			}else {
+//				
+//			}
+		}
+		
+		if( check ){
+			if( ListTools.isNotEmpty( ids )) {
+				calendarList = calendarServiceAdv.list(ids);
+				try {
+					wraps = Wo.copier.copy( calendarList );
+					if( ListTools.isNotEmpty( wraps )) {
+						for( Wo wo : wraps ) {
+							wo.setManageable( ThisApplication.isCalendarManager( effectivePerson, wo ) );
+							wo.setPublishable( ThisApplication.isCalendarPublisher( effectivePerson, unitNames, groupNames, wo ) );	
+						}
+					}
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionCalendarInfoProcess( e, "将所有查询到的日历信息对象转换为可以输出的信息时发生异常." );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}
+		}
+		result.setData(wraps);
+		return result;
+	}
+	
+	public static class Wi{
+		
+		@FieldDescribe( "日历名称" )
+		private String name = null;
+		
+		@FieldDescribe( "日历类型" )
+		private String type = null; 
+		
+		@FieldDescribe( "日历来源" )
+		private String source = null; 
+		
+		@FieldDescribe( "创建者" )
+		private String createor = null;
+
+		public String getName() {
+			return name;
+		}
+		public String getType() {
+			return type;
+		}
+		public String getSource() {
+			return source;
+		}
+		public String getCreateor() {
+			return createor;
+		}
+		public void setName(String name) {
+			this.name = name;
+		}
+		public void setType(String type) {
+			this.type = type;
+		}
+		public void setSource(String source) {
+			this.source = source;
+		}
+		public void setCreateor(String createor) {
+			this.createor = createor;
+		}
+	}
+
+	public static class Wo extends Calendar  {
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>();
+		
+		@FieldDescribe("用户是否可以对该日历进行管理.")
+		private Boolean manageable = false;
+		
+		@FieldDescribe("用户是否可以在该日历中发布日程事件.")
+		private Boolean publishable = false;
+		
+		public static WrapCopier<Calendar, Wo> copier = WrapCopierFactory.wo( Calendar.class, Wo.class, null,Wo.Excludes);
+		
+		public Boolean getManageable() {
+			return manageable;
+		}
+
+		public Boolean getPublishable() {
+			return publishable;
+		}
+
+		public void setManageable(Boolean manageable) {
+			this.manageable = manageable;
+		}
+
+		public void setPublishable(Boolean publishable) {
+			this.publishable = publishable;
+		}
+	}
+}

+ 143 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ActionSave.java

@@ -0,0 +1,143 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.annotation.AuditLog;
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+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.organization.Person;
+import com.x.base.core.project.organization.Unit;
+import com.x.calendar.assemble.control.ExceptionWrapInConvert;
+import com.x.calendar.core.entity.Calendar;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ActionSave extends BaseAction {
+	
+	private static Logger logger = LoggerFactory.getLogger( ActionSave.class );
+
+	@AuditLog(operation = "保存日历")
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, JsonElement jsonElement ) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wi wi = null;
+		Boolean check = true;
+		
+		try {
+			wi = this.convertToWrapIn( jsonElement, Wi.class );
+		} catch (Exception e ) {
+			check = false;
+			Exception exception = new ExceptionWrapInConvert( e, jsonElement );
+			result.error( exception );
+			logger.error( e, effectivePerson, request, null);
+		}
+		
+		if( check ){
+			if( StringUtils.isEmpty( wi.getName() ) ){
+				check = false;
+				Exception exception = new ExceptionCalendarNameEmpty();
+				result.error( exception );
+			}
+		}
+		
+		if( check ) {
+			if( StringUtils.isEmpty( wi.getType()  )) {
+				wi.setType("PERSON");
+			}
+		}
+		
+		if( check ) {
+			if( StringUtils.isEmpty( wi.getTarget()  )) {
+				check = false;
+				Exception exception = new ExceptionCalendarPropertyEmpty("target");
+				result.error( exception );
+			}
+		}
+		
+		if( check ) {
+			//校验target是否正常
+			if( "UNIT".equals( wi.getType() )) {
+				Unit unit = null;
+				if( StringUtils.isNotEmpty( wi.getTarget() )) {
+					unit = userManagerService.getUnitWIthFlag( wi.getTarget() );
+				}else {
+					unit = userManagerService.getUnitWIthFlag( effectivePerson.getDistinguishedName() );
+				}
+				if( unit == null ) {
+					check = false;
+					Exception exception = new ExceptionCalendarTargetInvalid( wi.getTarget() );
+					result.error( exception );
+				}else {
+					wi.setTarget( unit.getDistinguishedName() );
+				}
+			}else {
+				Person person = userManagerService.getPersonWithFlag( wi.getTarget() );
+				if( person == null ) {
+					wi.setTarget( effectivePerson.getDistinguishedName() );
+				}else {
+					wi.setTarget( person.getDistinguishedName() );
+				}
+			}
+		}
+		
+		Calendar calendar = null;
+		if( check ){
+			try {
+				calendar = Wi.copier.copy( wi );
+				if( StringUtils.isNotEmpty( wi.getId())){
+					calendar.setId( wi.getId() );
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "系统将用户传入的数据转换为日历信息对象时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			try {
+				calendar = calendarServiceAdv.save( calendar, effectivePerson );
+				result.setData( new Wo( calendar.getId() ) );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionCalendarInfoProcess( e, "保存日历信息时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		return result;
+	}
+	
+	public static class Wi extends Calendar {
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>(JpaObject.FieldsUnmodify);
+		
+		public static WrapCopier< Wi, Calendar > copier = WrapCopierFactory.wi( Wi.class, Calendar.class, null, Wi.Excludes );
+		
+		private String identity = null;
+
+		public String getIdentity() {
+			return identity;
+		}
+
+		public void setIdentity(String identity) {
+			this.identity = identity;
+		}
+	}
+	
+	public static class Wo extends WoId {
+		public Wo( String id ) {
+			setId( id );
+		}
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/BaseAction.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+import com.x.base.core.project.jaxrs.StandardJaxrsAction;
+import com.x.calendar.assemble.control.service.CalendarServiceAdv;
+import com.x.calendar.assemble.control.service.UserManagerService;
+
+public class BaseAction extends StandardJaxrsAction{
+	
+	protected CalendarServiceAdv calendarServiceAdv = new CalendarServiceAdv();
+	protected UserManagerService userManagerService = new UserManagerService();
+
+}

+ 281 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/CalendarAction.java

@@ -0,0 +1,281 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.container.AsyncResponse;
+import javax.ws.rs.container.Suspended;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+
+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.http.WrapOutBoolean;
+import com.x.base.core.project.jaxrs.ResponseFactory;
+import com.x.base.core.project.jaxrs.StandardJaxrsAction;
+import com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.calendar.assemble.control.ThisApplication;
+
+@Path("calendar")
+@JaxrsDescribe("日历信息管理服务")
+public class CalendarAction extends StandardJaxrsAction {
+
+	private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
+	private static Logger logger = LoggerFactory.getLogger(CalendarAction.class);
+
+	@JaxrsMethodDescribe(value = "获取我能访问到的所有日历信息列表", action = ActionListWhatICanView.class)
+	@GET
+	@Path("list/my")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void listMyCalendar(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request) {
+		ActionResult<ActionListWhatICanView.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+		if (check) {
+			try {
+				result = ((ActionListWhatICanView) proxy.getProxy(ActionListWhatICanView.class)).execute(request,
+						effectivePerson);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionCalendarInfoProcess(e, "获取我能访问到的所有日历信息列表时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "获取所有公开的日历信息列表", action = ActionListPublicCalendar.class)
+	@GET
+	@Path("list/public")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void listPublicCalendar(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request) {
+		ActionResult<List<ActionListPublicCalendar.Wo>> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionListPublicCalendar) proxy.getProxy(ActionListPublicCalendar.class)).execute(request,
+						effectivePerson);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionCalendarInfoProcess(e, "获取所有公开的日历信息列表时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "根据ID获取日历信息", action = ActionGet.class)
+	@GET
+	@Path("{id}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void get(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("日历信息ID") @PathParam("id") String id) {
+		ActionResult<ActionGet.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionGet) proxy.getProxy(ActionGet.class)).execute(request, effectivePerson, id);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionCalendarInfoProcess(e, "根据ID获取日历信息时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "根据条件查询日历信息列表", action = ActionListWithCondition.class)
+	@PUT
+	@Path("list/filter")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void listWithFilter(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("查询条件") JsonElement jsonElement) {
+		ActionResult<List<ActionListWithCondition.Wo>> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionListWithCondition) proxy.getProxy(ActionListWithCondition.class)).execute(request,
+						effectivePerson, jsonElement);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionCalendarInfoProcess(e, "根据条件查询日历信息列表时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "判断当前用户是否有管理员权限", action = ActionIsManager.class)
+	@GET
+	@Path("ismanager")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void isManager(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request) {
+		ActionResult<WrapOutBoolean> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionIsManager) proxy.getProxy(ActionIsManager.class)).execute(request, effectivePerson);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionCalendarInfoProcess(e, "判断当前用户是否有管理员权限时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "关注一个公开的日历信息", action = ActionFollowCalendar.class)
+	@GET
+	@Path("follow/{id}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void followCalendar(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("日历信息ID") @PathParam("id") String id) {
+		ActionResult<WrapOutBoolean> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionFollowCalendar) proxy.getProxy(ActionFollowCalendar.class)).execute(request,
+						effectivePerson, id);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionCalendarInfoProcess(e, "关注一个公开的日历信息时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "取消关注一个公开的日历信息", action = ActionFollowCalendarCancel.class)
+	@GET
+	@Path("follow/{id}/cancel")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void followCalendarCancel(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("日历信息ID") @PathParam("id") String id) {
+		ActionResult<WrapOutBoolean> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionFollowCalendarCancel) proxy.getProxy(ActionFollowCalendarCancel.class))
+						.execute(request, effectivePerson, id);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionCalendarInfoProcess(e, "取消关注一个公开的日历信息时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "判断当前用户是否对指定的日历有管理员权限", action = ActionIsCalendarManager.class)
+	@GET
+	@Path("ismanager/calendar/{accountId}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void isCalendarManager(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("指定的日历ID") String accountId) {
+		ActionResult<WrapOutBoolean> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionIsCalendarManager) proxy.getProxy(ActionIsCalendarManager.class)).execute(request,
+						effectivePerson, accountId);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionCalendarInfoProcess(e, "判断当前用户是否对指定的日历有管理员权限时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "新建或者更新日历信息", action = ActionSave.class)
+	@POST
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void save(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("日历信息") JsonElement jsonElement) {
+		ActionResult<ActionSave.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionSave) proxy.getProxy(ActionSave.class)).execute(request, effectivePerson, jsonElement);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionCalendarInfoProcess(e, "新建或者更新日历信息时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "根据ID删除日历信息及所有事件", action = ActionDelete.class)
+	@DELETE
+	@Path("{id}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void destory(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("日历信息ID") @PathParam("id") String id) {
+		ActionResult<ActionDelete.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionDelete) proxy.getProxy(ActionDelete.class)).execute(request, effectivePerson, id);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionCalendarInfoProcess(e, "根据ID删除日历信息及所有事件时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ExceptionCalendarIdEmpty.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionCalendarIdEmpty extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionCalendarIdEmpty() {
+		super("查询操作传入的参数日历Id为空,无法进行查询操作.");
+	}
+}

+ 16 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ExceptionCalendarInfoProcess.java

@@ -0,0 +1,16 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionCalendarInfoProcess extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionCalendarInfoProcess( Throwable e, String message ) {
+		super("用户在进行日历信息处理时发生异常!message:" + message, e );
+	}
+	
+	ExceptionCalendarInfoProcess( String message ) {
+		super("用户在进行日历信息处理时发生异常!message:" + message );
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ExceptionCalendarNameEmpty.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionCalendarNameEmpty extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionCalendarNameEmpty() {
+		super("操作传入的日历名称name为空,无法进行查询或者保存操作.");
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ExceptionCalendarNotExists.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionCalendarNotExists extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionCalendarNotExists( String id ) {
+		super("指定的日历信息不存在.ID:" + id );
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ExceptionCalendarPropertyEmpty.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionCalendarPropertyEmpty extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionCalendarPropertyEmpty( String name ) {
+		super("操作传入的日历属性'"+name+"'为空,无法进行保存操作.");
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/calendar/ExceptionCalendarTargetInvalid.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.calendar;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionCalendarTargetInvalid extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionCalendarTargetInvalid( String name ) {
+		super("操作传入的日历目标者标识'"+name+"'不合法,需要为人员标识或者组织标识.");
+	}
+}

+ 154 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionCreate.java

@@ -0,0 +1,154 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.annotation.AuditLog;
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.exception.PromptException;
+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.calendar.assemble.control.ExceptionWrapInConvert;
+import com.x.calendar.assemble.control.ThisApplication;
+import com.x.calendar.core.entity.Calendar;
+import com.x.calendar.core.entity.Calendar_Event;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ActionCreate extends BaseAction {
+	
+	private static Logger logger = LoggerFactory.getLogger( ActionCreate.class );
+
+	@AuditLog(operation = "保存日程事件")
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, JsonElement jsonElement ) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wi wi = null;
+		Calendar calendar = null;
+		Calendar_Event calendar_Event = null;
+		List<String> unitNames = null;
+		List<String> groupNames = null;
+		String personName = effectivePerson.getDistinguishedName();
+		Boolean check = true;
+
+		try {
+			wi = this.convertToWrapIn( jsonElement, Wi.class );
+			if( wi == null ) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( "需要保存的事件数据为空!" );
+				result.error( exception );
+			}
+		} catch (Exception e ) {
+			check = false;
+			Exception exception = new ExceptionWrapInConvert( e, jsonElement );
+			result.error( exception );
+			logger.error( e, effectivePerson, request, null);
+		}
+		
+		if( StringUtils.isEmpty( wi.getCalendarId() )) {
+			check = false;
+			Exception exception = new ExceptionCalendarPropertyEmpty("calendarId");
+			result.error( exception );
+		}
+		
+		if( check ){
+			try {
+				calendar = calendarServiceAdv.get( wi.getCalendarId() );
+				if( calendar == null ) {
+					check = false;
+					Exception exception = new ExceptionCalendarNotExists( wi.getCalendarId() );
+					result.error( exception );
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历信息时发生异常.ID:" + wi.getCalendarId() );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check && !ThisApplication.isCalendarSystemManager(effectivePerson) ) {
+			//判断用户权限
+			try {
+				unitNames = userManagerService.listUnitNamesWithPerson(personName);
+				groupNames = userManagerService.listGroupNamesByPerson(personName);
+				if( !(ThisApplication.isCalendarManager(effectivePerson, calendar) 
+						|| ThisApplication.isCalendarPublisher(effectivePerson, unitNames, groupNames, calendar )) ) {//没权限
+					check = false;
+					Exception exception = new ExceptionInsufficientPermissions( "您没有权限在日历中创建日程事件.日历:" + calendar.getName() );
+					result.error( exception );
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据用户查询组织和群组信息列表时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			try {
+				calendar_Event = Wi.copier.copy( wi );
+				if( StringUtils.isNotEmpty( wi.getId())){
+					calendar_Event.setId( wi.getId() );
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统将用户传入的数据转换为日历事件信息对象时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ) {
+			PromptException exception = this.eventValidate( calendar_Event, calendar );
+			if( exception != null ) {
+				check = false;
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			try {
+				calendar_Event = calendar_EventServiceAdv.create( calendar_Event, effectivePerson );
+				result.setData( new Wo( calendar_Event.getId() ) );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "保存日程信息时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		return result;
+	}
+
+	public static class Wi extends Calendar_Event{
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>(JpaObject.FieldsUnmodify);
+		
+		public static WrapCopier< Wi, Calendar_Event > copier =  WrapCopierFactory.wi( Wi.class, Calendar_Event.class, null, null );	
+		
+		private String identity = null;
+
+		public String getIdentity() {
+			return identity;
+		}
+
+		public void setIdentity(String identity) {
+			this.identity = identity;
+		}
+	}
+	
+	public static class Wo extends WoId {
+		public Wo( String id ) {
+			setId( id );
+		}
+	}
+}

+ 157 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionDestroyAfterEventId.java

@@ -0,0 +1,157 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.annotation.AuditLog;
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.jaxrs.WrapInteger;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.calendar.assemble.control.ThisApplication;
+import com.x.calendar.core.entity.Calendar;
+import com.x.calendar.core.entity.Calendar_Event;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 删除重复日程事件中某一事件开始后续所有的日程事件信息
+ * 
+ * 1、删除当前事件以及该重复事件主体信息已经生成的该ID事件后续时间内所有已经生成的日程事件信息
+ * 
+ * @author O2LEE
+ *
+ */
+public class ActionDestroyAfterEventId extends BaseAction {
+	
+	private static Logger logger = LoggerFactory.getLogger( ActionUpdateAfterEventId.class );
+
+	@AuditLog(operation = "删除日程事件")
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id ) throws Exception {
+		
+		//LogUtil.INFO( ">>>>>>ActionDestroyAfterEventId.execute......" );
+		ActionResult<Wo> result = new ActionResult<>();
+		Integer count = 0;
+		Wo wo = new Wo();
+		Calendar calendar = null;
+		Calendar_Event calendar_Event = null;
+		List<String> unitNames = null;
+		List<String> groupNames = null;
+		String personName = effectivePerson.getDistinguishedName();
+		Boolean check = true;
+		
+		if( check ){
+			if( StringUtils.isEmpty( id ) ){
+				check = false;
+				Exception exception = new ExceptionEventPropertyEmpty("ID");
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			try {
+				calendar_Event = calendar_EventServiceAdv.get( id );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历记录信息时发生异常.ID:" + id );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			if( calendar_Event == null ) {
+				check = false;
+				Exception exception = new ExceptionEventNotExists( id );
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			if( StringUtils.isNotEmpty( calendar_Event.getCalendarId() )) {
+				try {
+					calendar = calendarServiceAdv.get( calendar_Event.getCalendarId() );
+					if( calendar == null ) {
+						check = false;
+						Exception exception = new ExceptionCalendarNotExists( calendar_Event.getCalendarId() );
+						result.error( exception );
+					}
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历信息时发生异常.ID:" + calendar_Event.getCalendarId() );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}
+		}
+		
+		if( check && !ThisApplication.isCalendarSystemManager(effectivePerson) ) {
+			//判断用户权限
+			try {
+				unitNames = userManagerService.listUnitNamesWithPerson(personName);
+				groupNames = userManagerService.listGroupNamesByPerson(personName);
+				if( calendar != null ) {
+					if( !(ThisApplication.isCalendarManager(effectivePerson, calendar) 
+							|| ThisApplication.isCalendarPublisher(effectivePerson, unitNames, groupNames, calendar )) ) {//没权限
+						check = false;
+						Exception exception = new ExceptionInsufficientPermissions( "您没有权限从日历中删除日程事件.日历:" + calendar.getName() );
+						result.error( exception );
+					}
+				}				
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据用户查询组织和群组信息列表时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			if( StringUtils.isEmpty( calendar_Event.getRepeatMasterId() ) ) {
+				check = false;
+				Exception exception = new ExceptionEventIsNotRecurrenceEvent( id );
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			try {
+				count = calendar_EventServiceAdv.destoryAfterEventId( calendar_Event.getRepeatMasterId(), calendar_Event );
+				wo.setValue( count );
+				result.setData( wo );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "删除日程信息时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		return result;
+	}
+	
+public static class Wi extends Calendar_Event{
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>(JpaObject.FieldsUnmodify);
+		
+		public static WrapCopier< Wi, Calendar_Event > copier =  WrapCopierFactory.wi( Wi.class, Calendar_Event.class, null, null );	
+		
+		private String identity = null;
+
+		public String getIdentity() {
+			return identity;
+		}
+
+		public void setIdentity(String identity) {
+			this.identity = identity;
+		}
+	}
+	
+	public static class Wo extends WrapInteger {
+	}
+}

+ 115 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionDestroySingleEventWithId.java

@@ -0,0 +1,115 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.x.base.core.project.annotation.AuditLog;
+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.calendar.assemble.control.ThisApplication;
+import com.x.calendar.core.entity.Calendar;
+import com.x.calendar.core.entity.Calendar_Event;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+public class ActionDestroySingleEventWithId extends BaseAction {
+	
+	private Logger logger = LoggerFactory.getLogger( ActionDestroySingleEventWithId.class );
+
+	@AuditLog(operation = "删除日程事件")
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id ) throws Exception {
+		//LogUtil.INFO( ">>>>>>ActionDestroySingleEventWithId.execute......" );
+		ActionResult<Wo> result = new ActionResult<>();
+		Calendar calendar = null;
+		Calendar_Event calendar_event = null;
+		List<String> unitNames = null;
+		List<String> groupNames = null;
+		String personName = effectivePerson.getDistinguishedName();
+		Boolean check = true;
+		
+		if( check ){
+			if( StringUtils.isEmpty( id ) ){
+				check = false;
+				Exception exception = new ExceptionEventPropertyEmpty("ID");
+				result.error( exception );
+			}
+		}
+
+		if( check ){
+			try {
+				calendar_event = calendar_EventServiceAdv.get( id );
+				if( calendar_event == null ) {
+					check = false;
+					Exception exception = new ExceptionEventNotExists( id );
+					result.error( exception );
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历事件信息时发生异常.ID:" + id );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			if( StringUtils.isNotEmpty( calendar_event.getCalendarId() )) {
+				try {
+					calendar = calendarServiceAdv.get( calendar_event.getCalendarId() );
+					if( calendar == null ) {
+						check = false;
+						Exception exception = new ExceptionCalendarNotExists( calendar_event.getCalendarId() );
+						result.error( exception );
+					}
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历信息时发生异常.ID:" + calendar_event.getCalendarId() );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}
+		}
+		
+		if( check && !ThisApplication.isCalendarSystemManager(effectivePerson) ) {
+			//判断用户权限
+			try {
+				unitNames = userManagerService.listUnitNamesWithPerson(personName);
+				groupNames = userManagerService.listGroupNamesByPerson(personName);
+				if( calendar != null ) {
+					if( !(ThisApplication.isCalendarManager(effectivePerson, calendar) 
+							|| ThisApplication.isCalendarPublisher(effectivePerson, unitNames, groupNames, calendar )) ) {//没权限
+						check = false;
+						Exception exception = new ExceptionInsufficientPermissions( "您没有权限从日历中删除日程事件.日历:" + calendar.getName() );
+						result.error( exception );
+					}
+				}				
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据用户查询组织和群组信息列表时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			try {
+				calendar_EventServiceAdv.destory( id );
+				Wo wo = new Wo();
+				wo.setId( id );
+				result.setData( wo );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据ID删除指定日历事件信息时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		return result;
+	}
+
+	public static class Wo extends WoId  {
+	
+	}
+
+}

+ 116 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionDestroyWithMaster.java

@@ -0,0 +1,116 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.x.base.core.project.annotation.AuditLog;
+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.calendar.assemble.control.ThisApplication;
+import com.x.calendar.core.entity.Calendar;
+import com.x.calendar.core.entity.Calendar_Event;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.List;
+
+public class ActionDestroyWithMaster extends BaseAction {
+	
+	private Logger logger = LoggerFactory.getLogger( ActionDestroyWithMaster.class );
+
+	@AuditLog(operation = "删除日程事件")
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String eventId ) throws Exception {
+		//LogUtil.INFO( ">>>>>>ActionDestroyWithMaster.execute......" );
+		ActionResult<Wo> result = new ActionResult<>();
+		Calendar calendar = null;
+		Calendar_Event calendar_event = null;
+		List<String> unitNames = null;
+		List<String> groupNames = null;
+		String personName = effectivePerson.getDistinguishedName();
+		Boolean check = true;
+		
+		if( check ){
+			if( StringUtils.isEmpty( eventId ) ){
+				check = false;
+				Exception exception = new ExceptionEventPropertyEmpty("ID");
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			try {
+				calendar_event = calendar_EventServiceAdv.get( eventId );
+				if( calendar_event == null ) {
+					check = false;
+					Exception exception = new ExceptionEventNotExists( eventId );
+					result.error( exception );
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历事件信息时发生异常.ID:" + eventId );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			if( StringUtils.isNotEmpty( calendar_event.getCalendarId() )) {
+				try {
+					calendar = calendarServiceAdv.get( calendar_event.getCalendarId() );
+					if( calendar == null ) {
+						check = false;
+						Exception exception = new ExceptionCalendarNotExists( calendar_event.getCalendarId() );
+						result.error( exception );
+					}
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历信息时发生异常.ID:" + calendar_event.getCalendarId() );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}
+		}
+		
+		if( check && !ThisApplication.isCalendarSystemManager(effectivePerson) ) {
+			//判断用户权限
+			try {
+				unitNames = userManagerService.listUnitNamesWithPerson(personName);
+				groupNames = userManagerService.listGroupNamesByPerson(personName);
+				if( calendar != null ) {
+					if( !(ThisApplication.isCalendarManager(effectivePerson, calendar) 
+							|| ThisApplication.isCalendarPublisher(effectivePerson, unitNames, groupNames, calendar )) ) {//没权限
+						check = false;
+						Exception exception = new ExceptionInsufficientPermissions( "您没有权限从日历中删除日程事件.日历:" + calendar.getName() );
+						result.error( exception );
+					}
+				}				
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据用户查询组织和群组信息列表时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			//然后把repeatMaster删除, repeatMaster删除时会把该Master生成的所有事件全部删除
+			try {
+				calendar_RepeatedMasterServiceAdv.destoryWithMasterId( calendar_event.getRepeatMasterId() );
+				Wo wo = new Wo();
+				wo.setId( eventId );
+				result.setData( wo );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据事件ID删除所有重复事件信息时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		return result;
+	}
+
+	public static class Wo extends WoId  {
+	
+	}
+
+}

+ 124 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionGet.java

@@ -0,0 +1,124 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import com.x.calendar.core.entity.Calendar_EventComment;
+import org.apache.commons.lang3.StringUtils;
+
+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.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.calendar.assemble.control.ThisApplication;
+import com.x.calendar.core.entity.Calendar;
+import com.x.calendar.core.entity.Calendar_Event;
+
+public class ActionGet extends BaseAction {
+	
+	private Logger logger = LoggerFactory.getLogger( ActionGet.class );
+	
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id ) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wo wrap = null;
+		Calendar calendar = null;
+		Calendar_Event calendar_Event = null;
+		Calendar_EventComment calendar_EventComment = null;
+		Boolean check = true;
+		
+		if( check ){
+			if( StringUtils.isEmpty( id ) ){
+				check = false;
+				Exception exception = new ExceptionEventPropertyEmpty("ID");
+				result.error( exception );
+			}
+		}
+
+		if( check ){
+			try {
+				calendar_Event = calendar_EventServiceAdv.get( id );
+				if( calendar_Event == null ) {
+					check = false;
+					Exception exception = new ExceptionEventNotExists( id );
+					result.error( exception );
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历记录信息时发生异常.ID:" + id );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			try {
+				calendar = calendarServiceAdv.get( calendar_Event.getCalendarId() );
+				if( calendar == null ) {
+					check = false;
+					Exception exception = new ExceptionCalendarNotExists( id );
+					result.error( exception );
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历信息时发生异常.ID:" + id );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+
+		if( check ){
+			if( StringUtils.equals( "{#CLOB#}", calendar_Event.getComment() ) && StringUtils.isNotEmpty( calendar_Event.getCommentId() )){
+				try {
+					calendar_EventComment = calendar_EventServiceAdv.getCommentWithCommentId( calendar_Event.getCommentId() );
+					if( calendar_EventComment != null ) {
+						calendar_Event.setComment( calendar_EventComment.getLobValue() );
+					}
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历记录信息时发生异常.ID:" + id );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}
+		}
+		
+		if( check ){
+			try {
+				wrap = Wo.copier.copy( calendar_Event );
+				wrap.setManageable(ThisApplication.isEventManager( effectivePerson, calendar, calendar_Event ));				
+				result.setData( wrap );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "将所有查询到的日历记录信息对象转换为可以输出的信息时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		return result;
+	}
+
+	public static class Wo extends Calendar_Event  {
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>();
+		
+		@FieldDescribe("用户是否可以对该事件进行管理.")
+		private Boolean manageable = false;
+		
+		public static WrapCopier<Calendar_Event, Wo> copier = WrapCopierFactory.wo( Calendar_Event.class, Wo.class, null,Wo.Excludes);
+
+		public Boolean getManageable() {
+			return manageable;
+		}
+
+		public void setManageable(Boolean manageable) {
+			this.manageable = manageable;
+		}		
+	}
+}

+ 67 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionGetRFCContent.java

@@ -0,0 +1,67 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+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.WrapString;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.calendar.core.entity.Calendar_Event;
+
+public class ActionGetRFCContent extends BaseAction {
+	
+	private Logger logger = LoggerFactory.getLogger( ActionGetRFCContent.class );
+	
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id ) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wo wrap = new Wo();
+		String content = null;
+		Calendar_Event calendar_Event = null;
+		Boolean check = true;
+		
+		if( check ){
+			if( StringUtils.isEmpty( id ) ){
+				check = false;
+				Exception exception = new ExceptionEventPropertyEmpty("ID");
+				result.error( exception );
+			}
+		}
+
+		if( check ){
+			try {
+				calendar_Event = calendar_EventServiceAdv.get( id );
+				if( calendar_Event == null ) {
+					check = false;
+					Exception exception = new ExceptionEventNotExists( id );
+					result.error( exception );
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历记录信息时发生异常.ID:" + id );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			try {
+				content = calendar_EventServiceAdv.getiCalContent(calendar_Event);
+				wrap.setValue( content );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统在获取日程信息的RFC内容时发生异常.ID:" + id );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		result.setData( wrap );
+		return result;
+	}
+
+	public static class Wo extends WrapString  {
+	}
+
+}

+ 342 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionListWithCondition.java

@@ -0,0 +1,342 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import java.util.ArrayList;
+import java.util.Date;
+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.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+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.calendar.assemble.control.ExceptionWrapInConvert;
+import com.x.calendar.core.entity.Calendar_Event;
+
+/**
+ * 根据条件和权限列示能访问到的符合条件的日历信息
+ * 1、查询时间段内有多少重复事件主体需要进行事件生成
+ * 2、生成事件
+ * 3、根据条件查询日程事件信息列表
+ * @author O2LEE
+ *
+ */
+public class ActionListWithCondition extends BaseAction {
+	
+private Logger logger = LoggerFactory.getLogger( ActionListWithCondition.class );
+	
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, JsonElement jsonElement ) throws Exception {		
+		ActionResult<Wo> result = new ActionResult<>();
+		Wo wo = new Wo();
+		List<WoCalendar_Event> wrapEvents = null;
+		List<Calendar_Event> calendar_EventList = null;
+		Boolean check = true;
+		Wi wi = null;
+		List<String> ids = null;
+		List<String> unitNames = null;
+		List<String> groupNames = null;
+		String personName = effectivePerson.getDistinguishedName();
+				
+//		if( check ) {
+//			try {
+//				manager = ThisApplication.isCalendarSystemManager( effectivePerson );
+//			}catch( Exception e) {
+//				check = false;
+//				Exception exception = new ExceptionEventProcess( e, "系统根据查询用户是否是系统管理员时发生异常." );
+//				result.error( exception );
+//				logger.error( e, effectivePerson, request, null);
+//			}
+//		}		
+
+		try {
+			wi = this.convertToWrapIn( jsonElement, Wi.class );
+		} catch (Exception e ) {
+			check = false;
+			Exception exception = new ExceptionWrapInConvert( e, jsonElement );
+			result.error( exception );
+			logger.error( e, effectivePerson, request, null);
+		}
+		
+		if( check ){
+			//如果没有设置查询日期范围就查本月的
+			if( wi.getStartTime() == null && wi.getEndTime() == null ) {
+				wi.setStartTime( dateOperation.getFirstDayInMonth( new Date() ));
+				wi.setEndTime( dateOperation.getEndDayInMonth( new Date() ));
+			}
+			if( StringUtils.isEmpty( wi.getEventType() )) {
+				wi.setEventType( "CAL_EVENT" );
+			}
+		}
+		
+		if( check ){
+			try {
+				unitNames = userManagerService.listUnitNamesWithPerson( personName );
+				groupNames = userManagerService.listGroupNamesByPerson( personName );
+				if( ListTools.isEmpty( wi.getCalendarIds()  )) {
+					//查询用户可以看到的所有CalendarIds
+					wi.setCalendarIds( calendarServiceAdv.listWithCondition(personName, unitNames, groupNames) );
+				}
+				if( ListTools.isNotEmpty( wi.getCalendarIds()  ) ) {
+					ids = calendar_EventServiceAdv.listWithCondition( wi.getKey(), wi.getEventType(), wi.getSource(), wi.getCreatePerson(), wi.getCalendarIds(),
+							personName, unitNames, groupNames, wi.getStartTime(), wi.getEndTime() );
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据用户权限查询日历信息ID列表时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+//			if( manager ) {
+//				try {
+//					ids = calendar_EventServiceAdv.listWithCondition( wi.getKey(), wi.getEventType(), wi.getSource(), wi.getCreatePerson(), wi.getCalendarIds(), 
+//							null, null, null, wi.getStartTime(), wi.getEndTime() );
+//				} catch (Exception e) {
+//					check = false;
+//					Exception exception = new ExceptionEventProcess( e, "系统根据用户权限查询日历信息ID列表时发生异常." );
+//					result.error( exception );
+//					logger.error( e, effectivePerson, request, null);
+//				}
+//			}else {
+//				
+//			}
+		}
+		
+		if( check ){
+			if( ListTools.isNotEmpty( ids )) {
+				calendar_EventList = calendar_EventServiceAdv.list(ids);
+				try {
+					wrapEvents = WoCalendar_Event.copier.copy( calendar_EventList );
+					if( ListTools.isNotEmpty( wrapEvents )) {
+						//组织为输入需要的格式
+						wo.initInOneDayEventsList( wi.getStartTime(), wi.getEndTime() );
+						for( WoCalendar_Event calendar_Event : wrapEvents ) {
+							//组织输出的形式
+							if( calendar_Event.getDaysOfDuration() >= 1 ) {
+								wo.addWholeDayEvent(calendar_Event);
+							}else {
+								wo.addInOneDayEvents( dateOperation.getDate( calendar_Event.getStartTime(), "yyyy-MM-dd"), calendar_Event);
+							}
+						}
+					}
+					if( wo.getInOneDayEvents() == null ) {
+						wo.setInOneDayEvents( new ArrayList<>());
+					}
+					if( wo.getWholeDayEvents() == null ) {
+						wo.setWholeDayEvents( new ArrayList<>());
+					}					
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionEventProcess( e, "将所有查询到的日历信息对象转换为可以输出的信息时发生异常." );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}
+		}
+		result.setData(wo);
+		return result;
+	}
+	
+	public static class Wi{
+
+		@FieldDescribe("日历账号ID")
+		private List<String> calendarIds = null;
+		
+		@FieldDescribe("信息类别: CAL_EVENT | TASK_EVENT")
+		private String eventType = "CAL_EVENT";
+		
+		@FieldDescribe("信息来源: PERSONAL| LEADER | UNIT | MEETING | BUSINESS_TRIP | HOLIDAY")
+		private String source;
+		
+		@FieldDescribe("事件标题 或者 备注信息 模糊搜索")
+		private String key = null;
+		
+		@FieldDescribe("查询开始时间")
+		private Date startTime = null;
+
+		@FieldDescribe("查询结束时间")
+		private Date endTime = null;
+
+		@FieldDescribe("创建者")
+	    private String createPerson = null;
+
+		public String getEventType() {
+			return eventType;
+		}
+
+		public String getKey() {
+			return key;
+		}
+
+		public Date getStartTime() {
+			return startTime;
+		}
+
+		public Date getEndTime() {
+			return endTime;
+		}
+
+		public void setEventType(String eventType) {
+			this.eventType = eventType;
+		}
+
+		public void setKey(String key) {
+			this.key = key;
+		}
+
+		public void setStartTime(Date startTime) {
+			this.startTime = startTime;
+		}
+
+		public void setEndTime(Date endTime) {
+			this.endTime = endTime;
+		}
+
+		public String getSource() {
+			return source;
+		}
+
+		public void setSource(String source) {
+			this.source = source;
+		}
+
+		public List<String> getCalendarIds() {
+			return calendarIds;
+		}
+
+		public void setCalendarIds(List<String> calendarIds) {
+			this.calendarIds = calendarIds;
+		}
+
+		public String getCreatePerson() {
+			return createPerson;
+		}
+
+		public void setCreatePerson(String createPerson) {
+			this.createPerson = createPerson;
+		}
+		
+	}
+	
+	public static class Wo {
+		
+		@FieldDescribe("全天或者持续超1天(跨1天)的事件列表.")
+		private List<WoCalendar_Event> wholeDayEvents = null;
+		
+		@FieldDescribe("持续时间在1天以内的事件列表.按日期分开")
+		private List<WoCalendar_Event_ForDay> inOneDayEvents = null;
+
+		public List<WoCalendar_Event> getWholeDayEvents() {
+			if( wholeDayEvents == null ) {
+				wholeDayEvents = new ArrayList<>();
+			}
+			return wholeDayEvents;
+		}
+
+		public List<WoCalendar_Event_ForDay> getInOneDayEvents() {
+			if( inOneDayEvents == null ) {
+				inOneDayEvents = new ArrayList<>();
+			}
+			return inOneDayEvents;
+		}
+
+		public void setWholeDayEvents(List<WoCalendar_Event> wholeDayEvents) {
+			this.wholeDayEvents = wholeDayEvents;
+		}
+
+		public void setInOneDayEvents(List<WoCalendar_Event_ForDay> inOneDayEvents) {
+			this.inOneDayEvents = inOneDayEvents;
+		}
+		
+		public List<WoCalendar_Event_ForDay> initInOneDayEventsList( Date startDate, Date endDate ){
+			List<WoCalendar_Event_ForDay> eventsForDayList = new ArrayList<>();
+			List<String> dateStrings = dateOperation.listDaysBetweenDate(startDate, endDate);
+			if( ListTools.isNotEmpty( dateStrings )) {
+				for( String dateString : dateStrings ) {
+					WoCalendar_Event_ForDay woCalendar_Event_ForDay = new WoCalendar_Event_ForDay();
+					woCalendar_Event_ForDay.setEventDate( dateString );
+					woCalendar_Event_ForDay.setInOneDayEvents( new ArrayList<>());
+					eventsForDayList.add( woCalendar_Event_ForDay );
+				}
+			}
+			this.inOneDayEvents = eventsForDayList;
+			return this.inOneDayEvents;
+		}
+		
+		public List<WoCalendar_Event_ForDay> addInOneDayEvents( String eventDate, WoCalendar_Event woEvent ){
+			if( this.inOneDayEvents == null ) {
+				this.inOneDayEvents = new ArrayList<>();
+			}
+			for( WoCalendar_Event_ForDay calendar_Events_ForDay : this.inOneDayEvents ) {
+				if( eventDate.equalsIgnoreCase(calendar_Events_ForDay.getEventDate()  )) {
+					calendar_Events_ForDay.addEventInDay( woEvent );
+				}
+			}
+			return this.inOneDayEvents;
+		}
+		
+		public List<WoCalendar_Event> addWholeDayEvent( WoCalendar_Event woEvent ){
+			if( this.wholeDayEvents == null ) {
+				this.wholeDayEvents = new ArrayList<>();
+			}
+			if( !this.wholeDayEvents.contains( woEvent )) {
+				this.wholeDayEvents.add( woEvent );
+			}
+			return this.wholeDayEvents;
+		}
+	}
+	
+	public static class WoCalendar_Event_ForDay  {
+		
+		@FieldDescribe("日期字符串.")
+		private String eventDate = null;
+		
+		@FieldDescribe("持续时间在1天以内的事件列表.")
+		private List<WoCalendar_Event> inOneDayEvents = null;
+
+		public String getEventDate() {
+			return eventDate;
+		}
+
+		public List<WoCalendar_Event> getInOneDayEvents() {
+			if( inOneDayEvents == null ) {
+				inOneDayEvents = new ArrayList<>();
+			}
+			return inOneDayEvents;
+		}
+
+		public void setEventDate(String eventDate) {
+			this.eventDate = eventDate;
+		}
+
+		public void setInOneDayEvents(List<WoCalendar_Event> inOneDayEvents) {
+			this.inOneDayEvents = inOneDayEvents;
+		}		
+		
+		public List<WoCalendar_Event> addEventInDay( WoCalendar_Event woEvent ){
+			if( this.inOneDayEvents == null ) {
+				this.inOneDayEvents = new ArrayList<>();
+			}
+			if( !this.inOneDayEvents.contains( woEvent )) {
+				this.inOneDayEvents.add( woEvent );
+			}
+			return this.inOneDayEvents;
+		}
+	}
+
+	public static class WoCalendar_Event extends Calendar_Event  {
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>();
+		
+		public static WrapCopier<Calendar_Event, WoCalendar_Event> copier = 
+				WrapCopierFactory.wo( Calendar_Event.class, WoCalendar_Event.class, null,WoCalendar_Event.Excludes);
+	}
+}

+ 307 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionMessageReceive.java

@@ -0,0 +1,307 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import java.util.ArrayList;
+import java.util.Date;
+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.exception.PromptException;
+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.WrapBoolean;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.calendar.assemble.control.EnumCalendarSource;
+import com.x.calendar.assemble.control.ExceptionWrapInConvert;
+import com.x.calendar.core.entity.Calendar_Event;
+
+public class ActionMessageReceive extends BaseAction {
+
+	private Logger logger = LoggerFactory.getLogger(ActionMessageReceive.class);
+
+	protected ActionResult<Wo> execute(HttpServletRequest request, EffectivePerson effectivePerson, JsonElement jsonElement) throws Exception {
+		logger.debug("receive:{}.", jsonElement);
+		ActionResult<Wo> result = new ActionResult<>();
+		Wi message = new Wi();
+		Wo wo = new Wo();
+		wo.setValue( false );
+		Calendar_Event calendar_Event = null;
+		Boolean check = true;
+		
+		try {
+			message = this.convertToWrapIn( jsonElement, Wi.class );
+		} catch (Exception e ) {
+			check = false;
+			Exception exception = new ExceptionWrapInConvert( e, jsonElement );
+			result.error( exception );
+			logger.error( e, effectivePerson, request, null);
+		}
+		
+		if( check ) {
+			//MEETING: meeting_invite | meeting_delete | meeting_accept | meeting_reject"
+			if( message != null ) {
+				if( "meeting_accept".equalsIgnoreCase( message.getType() ) ) {
+					calendar_Event = composeCalendarEvent( message );
+					PromptException exception = this.eventValidate( calendar_Event, null );
+					if( exception != null ) {
+						check = false;
+						result.error( exception );
+					}else {
+						try {
+							calendar_Event = calendar_EventServiceAdv.createByCipher( calendar_Event );
+							List<String> ids = new ArrayList<>();
+							ids.add( calendar_Event.getId() );
+							wo.setValue( true );
+						} catch (Exception e) {
+							check = false;
+							exception = new ExceptionMessageProcess( e, "处理消息信息时发生异常." );
+							result.error( exception );
+							logger.error( e, effectivePerson, request, null);
+						}
+					}
+				}else if( "calendar_event_delete".equalsIgnoreCase( message.getType() ) ) {
+					deleteCalendarEvent( message );
+					wo.setValue( true );
+				}
+			}
+		}
+		result.setData(wo);
+		return result;
+	}
+
+	/**
+	 * 删除日历事件
+	 * @param message
+	 * @return
+	 * @throws Exception
+	 */
+	private List<String> deleteCalendarEvent( Wi message ) throws Exception {
+		WiMeeting wiMeeting = gson.fromJson( message.getBody(), WiMeeting.class );
+		if( StringUtils.isNotEmpty( wiMeeting.getId() ) ) {
+			//根据bundle来删除
+			return calendar_EventServiceAdv.destoryWithBundle( wiMeeting.getId() );
+		}
+		return null;
+	}
+	
+	/**
+	 * 将消息对象转换为一个日程事件对象
+	 * @param message
+	 * @return
+	 * @throws Exception 
+	 */
+	private Calendar_Event composeCalendarEvent( Wi message ) throws Exception {
+		WiMeeting wiMeeting = null;
+		Calendar_Event calendar_Event = null;
+		String person = message.getPerson();
+		String title = message.getTitle();
+		if( StringUtils.isEmpty( person )) {
+			throw new Exception("person is empy!");
+		}
+		wiMeeting = gson.fromJson( message.getBody(), WiMeeting.class );
+		if( wiMeeting != null ) {
+			calendar_Event = new Calendar_Event();
+			calendar_Event.setBundle( wiMeeting.getId() );
+			calendar_Event.setColor( "#1462BE" );
+			calendar_Event.setComment( title );
+			calendar_Event.setValarm_description( wiMeeting.getDescription() );
+			calendar_Event.setValarm_Summary( title );			
+			calendar_Event.setEventType( "CAL_EVENT" );
+			calendar_Event.setStartTime( wiMeeting.getStartTime() );
+			calendar_Event.setEndTime( wiMeeting.getCompletedTime() );	
+			calendar_Event.setSource( EnumCalendarSource.MEETING.name() );
+			calendar_Event.setValarmTime_config( "0,0,-30,0" );
+			return calendar_Event;
+		}
+		return null;
+	}
+	
+	public static class Wi extends GsonPropertyObject {
+
+		@FieldDescribe("消息类型:meeting_invite | meeting_delete | meeting_accept | meeting_reject")
+		private String type;
+
+		@FieldDescribe("接收者")
+		private String person;
+
+		@FieldDescribe("消息提醒标题")
+		private String title;
+
+		@FieldDescribe("消息内容")
+		private JsonElement body;
+
+		public String getType() {
+			return type;
+		}
+
+		public void setType(String type) {
+			this.type = type;
+		}
+
+		public String getPerson() {
+			return person;
+		}
+
+		public void setPerson(String person) {
+			this.person = person;
+		}
+
+		public String getTitle() {
+			return title;
+		}
+
+		public void setTitle(String title) {
+			this.title = title;
+		}
+
+		public JsonElement getBody() {
+			return body;
+		}
+
+		public void setBody(JsonElement body) {
+			this.body = body;
+		}
+	}
+
+	public static class WiMeeting{
+		
+		public static List<String> Excludes = new ArrayList<String>(JpaObject.FieldsUnmodify);
+		
+		public static WrapCopier< Wi, WiMeeting > copier =  WrapCopierFactory.wi( Wi.class, WiMeeting.class, null, null );	
+		
+		@FieldDescribe("数据库主键,自动生成.")
+		private String id = null;
+		
+		@FieldDescribe("名称")
+		private String subject;
+
+		@FieldDescribe("说明")
+		private String description;
+
+		@FieldDescribe("所属楼层.")
+		private String room;
+		
+		@FieldDescribe("开始时间.")
+		private Date startTime;
+
+		@FieldDescribe("结束时间.")
+		private Date completedTime;
+
+		@FieldDescribe("邀请人员.")
+		private List<String> invitePersonList;
+
+		@FieldDescribe("接受人员.")
+		private List<String> acceptPersonList;
+
+		@FieldDescribe("拒绝人员.")
+		private List<String> rejectPersonList;
+
+		@FieldDescribe("会议申请人")
+		private String applicant;
+
+		@FieldDescribe("备注.")
+		private String memo;
+
+		public String getId() {
+			return id;
+		}
+
+		public String getSubject() {
+			return subject;
+		}
+
+		public String getDescription() {
+			return description;
+		}
+
+		public String getRoom() {
+			return room;
+		}
+
+		public Date getStartTime() {
+			return startTime;
+		}
+
+		public Date getCompletedTime() {
+			return completedTime;
+		}
+
+		public List<String> getInvitePersonList() {
+			return invitePersonList;
+		}
+
+		public List<String> getAcceptPersonList() {
+			return acceptPersonList;
+		}
+
+		public List<String> getRejectPersonList() {
+			return rejectPersonList;
+		}
+
+		public String getApplicant() {
+			return applicant;
+		}
+
+		public String getMemo() {
+			return memo;
+		}
+
+		public void setId(String id) {
+			this.id = id;
+		}
+
+		public void setSubject(String subject) {
+			this.subject = subject;
+		}
+
+		public void setDescription(String description) {
+			this.description = description;
+		}
+
+		public void setRoom(String room) {
+			this.room = room;
+		}
+
+		public void setStartTime(Date startTime) {
+			this.startTime = startTime;
+		}
+
+		public void setCompletedTime(Date completedTime) {
+			this.completedTime = completedTime;
+		}
+
+		public void setInvitePersonList(List<String> invitePersonList) {
+			this.invitePersonList = invitePersonList;
+		}
+
+		public void setAcceptPersonList(List<String> acceptPersonList) {
+			this.acceptPersonList = acceptPersonList;
+		}
+
+		public void setRejectPersonList(List<String> rejectPersonList) {
+			this.rejectPersonList = rejectPersonList;
+		}
+
+		public void setApplicant(String applicant) {
+			this.applicant = applicant;
+		}
+
+		public void setMemo(String memo) {
+			this.memo = memo;
+		}		
+	}
+
+	public static class Wo extends WrapBoolean {
+
+	}
+
+}

+ 221 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionSimpleListWithCondition.java

@@ -0,0 +1,221 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import java.util.ArrayList;
+import java.util.Date;
+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.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+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.base.core.project.tools.SortTools;
+import com.x.calendar.assemble.control.ExceptionWrapInConvert;
+import com.x.calendar.assemble.control.ThisApplication;
+import com.x.calendar.core.entity.Calendar_Event;
+
+/**
+ * 根据条件和权限列示能访问到的符合条件的日历信息(输出简单的列表,不按天组织)
+ * 1、查询时间段内有多少重复事件主体需要进行事件生成
+ * 2、生成事件
+ * 3、根据条件查询日程事件信息列表
+ * @author O2LEE
+ *
+ */
+public class ActionSimpleListWithCondition extends BaseAction {
+	
+private Logger logger = LoggerFactory.getLogger( ActionSimpleListWithCondition.class );
+	
+	protected ActionResult<List<Wo>> execute( HttpServletRequest request, EffectivePerson effectivePerson, JsonElement jsonElement ) throws Exception {		
+		ActionResult<List<Wo>> result = new ActionResult<>();
+		List<Wo> wos = new ArrayList<>();
+		List<Calendar_Event> calendar_EventList = null;
+		Boolean check = true;
+		Boolean manager = false;
+		Wi wi = null;
+		List<String> ids = null;
+		List<String> unitNames = null;
+		List<String> groupNames = null;
+		String personName = effectivePerson.getDistinguishedName();
+				
+		if( check ) {
+			try {
+				manager = ThisApplication.isCalendarSystemManager( effectivePerson );
+			}catch( Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据查询用户是否是系统管理员时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}		
+
+		try {
+			wi = this.convertToWrapIn( jsonElement, Wi.class );
+		} catch (Exception e ) {
+			check = false;
+			Exception exception = new ExceptionWrapInConvert( e, jsonElement );
+			result.error( exception );
+			logger.error( e, effectivePerson, request, null);
+		}
+		
+		if( check ){
+			//如果没有设置查询日期范围就查本月的
+			if( wi.getStartTime() == null && wi.getEndTime() == null ) {
+				wi.setStartTime( dateOperation.getFirstDayInMonth( new Date() ));
+				wi.setEndTime( dateOperation.getEndDayInMonth( new Date() ));
+			}
+			if( StringUtils.isEmpty( wi.getEventType() )) {
+				wi.setEventType( "CAL_EVENT" );
+			}
+		}
+		
+		if( check ){
+			if( manager ) {
+				try {
+					ids = calendar_EventServiceAdv.listWithCondition( wi.getKey(), wi.getEventType(), wi.getSource(), wi.getCreatePerson(), wi.getCalendarIds(), 
+							null, null, null, wi.getStartTime(), wi.getEndTime() );
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionEventProcess( e, "系统根据用户权限查询日历信息ID列表时发生异常." );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}else {
+				try {
+					unitNames = userManagerService.listUnitNamesWithPerson( personName );
+					groupNames = userManagerService.listGroupNamesByPerson( personName );
+					if( ListTools.isEmpty( wi.getCalendarIds()  )) {
+						//查询用户可以看到的所有CalendarIds
+						wi.setCalendarIds( calendarServiceAdv.listWithCondition(personName, unitNames, groupNames) );
+					}
+					if( ListTools.isNotEmpty( wi.getCalendarIds()  ) ) {
+						ids = calendar_EventServiceAdv.listWithCondition( wi.getKey(), wi.getEventType(), wi.getSource(), wi.getCreatePerson(), wi.getCalendarIds(),
+								personName, unitNames, groupNames, wi.getStartTime(), wi.getEndTime() );
+					}
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionEventProcess( e, "系统根据用户权限查询日历信息ID列表时发生异常." );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}
+		}
+		
+		if( check ){
+			if( ListTools.isNotEmpty( ids )) {
+				calendar_EventList = calendar_EventServiceAdv.list(ids);
+				try {
+					wos = Wo.copier.copy( calendar_EventList );
+					if( ListTools.isNotEmpty( wos )) {
+						SortTools.asc( wos, "startTime" );
+					}
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionEventProcess( e, "将所有查询到的日历信息对象转换为可以输出的信息时发生异常." );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}
+		}
+		result.setData( wos );
+		return result;
+	}
+	
+	public static class Wi{
+
+		@FieldDescribe("日历账号ID")
+		private List<String> calendarIds = null;
+		
+		@FieldDescribe("信息类别: CAL_EVENT | TASK_EVENT")
+		private String eventType = "CAL_EVENT";
+		
+		@FieldDescribe("信息来源: PERSONAL| LEADER | UNIT | MEETING | BUSINESS_TRIP | HOLIDAY")
+		private String source;
+		
+		@FieldDescribe("事件标题 或者 备注信息 模糊搜索")
+		private String key = null;
+		
+		@FieldDescribe("查询开始时间")
+		private Date startTime = null;
+
+		@FieldDescribe("查询结束时间")
+		private Date endTime = null;
+
+		@FieldDescribe("创建者")
+	    private String createPerson = null;
+
+		public String getEventType() {
+			return eventType;
+		}
+
+		public String getKey() {
+			return key;
+		}
+
+		public Date getStartTime() {
+			return startTime;
+		}
+
+		public Date getEndTime() {
+			return endTime;
+		}
+
+		public void setEventType(String eventType) {
+			this.eventType = eventType;
+		}
+
+		public void setKey(String key) {
+			this.key = key;
+		}
+
+		public void setStartTime(Date startTime) {
+			this.startTime = startTime;
+		}
+
+		public void setEndTime(Date endTime) {
+			this.endTime = endTime;
+		}
+
+		public String getSource() {
+			return source;
+		}
+
+		public void setSource(String source) {
+			this.source = source;
+		}
+
+		public List<String> getCalendarIds() {
+			return calendarIds;
+		}
+
+		public void setCalendarIds(List<String> calendarIds) {
+			this.calendarIds = calendarIds;
+		}
+
+		public String getCreatePerson() {
+			return createPerson;
+		}
+
+		public void setCreatePerson(String createPerson) {
+			this.createPerson = createPerson;
+		}
+		
+	}
+	
+	public static class Wo extends Calendar_Event  {
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>();
+		
+		public static WrapCopier<Calendar_Event, Wo> copier = WrapCopierFactory.wo( Calendar_Event.class, Wo.class, null,Wo.Excludes);
+	}
+}

+ 197 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionUpdateAfterEventId.java

@@ -0,0 +1,197 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.annotation.AuditLog;
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.exception.PromptException;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.jaxrs.WrapInteger;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.calendar.assemble.control.ExceptionWrapInConvert;
+import com.x.calendar.assemble.control.ThisApplication;
+import com.x.calendar.core.entity.Calendar;
+import com.x.calendar.core.entity.Calendar_Event;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 更新重复日程事件中某一事件开始后续所有的日程事件信息
+ * 1、更新日程事件重复信息主体
+ * 2、删除当前事件以及该重复事件主体信息已经生成的该ID事件后续时间内所有已经生成的日程事件信息
+ * 3、删除该事件重复主体信息中相应的已经生成的月份信息(已经删除的有信息月份以及以后所有的月份)
+ * @author O2LEE
+ *
+ */
+public class ActionUpdateAfterEventId extends BaseAction {
+	
+	private static Logger logger = LoggerFactory.getLogger( ActionUpdateAfterEventId.class );
+	@AuditLog(operation = "修改日程事件")
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id, JsonElement jsonElement ) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Integer count = 0;
+		Wo wo = new Wo();
+		Wi wi = null;
+		Calendar calendar = null;
+		Calendar_Event calendar_Event = null;
+		Calendar_Event new_Event = null;
+		List<String> unitNames = null;
+		List<String> groupNames = null;
+		String personName = effectivePerson.getDistinguishedName();
+		Boolean check = true;
+		
+		try {
+			wi = this.convertToWrapIn( jsonElement, Wi.class );
+		} catch (Exception e ) {
+			check = false;
+			Exception exception = new ExceptionWrapInConvert( e, jsonElement );
+			result.error( exception );
+			logger.error( e, effectivePerson, request, null);
+		}
+		
+		if( check ){
+			if( StringUtils.isEmpty( id ) ){
+				check = false;
+				Exception exception = new ExceptionEventPropertyEmpty("ID");
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			try {
+				calendar_Event = calendar_EventServiceAdv.get( id );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历记录信息时发生异常.ID:" + id );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			if( calendar_Event == null ) {
+				check = false;
+				Exception exception = new ExceptionEventNotExists( id );
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			if( StringUtils.isNotEmpty( calendar_Event.getCalendarId() )) {
+				try {
+					calendar = calendarServiceAdv.get( calendar_Event.getCalendarId() );
+					if( calendar == null ) {
+						check = false;
+						Exception exception = new ExceptionCalendarNotExists( calendar_Event.getCalendarId() );
+						result.error( exception );
+					}
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历信息时发生异常.ID:" + calendar_Event.getCalendarId() );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}
+		}
+		
+		if( check && !ThisApplication.isCalendarSystemManager(effectivePerson) ) {
+			//判断用户权限
+			try {
+				unitNames = userManagerService.listUnitNamesWithPerson(personName);
+				groupNames = userManagerService.listGroupNamesByPerson(personName);
+				if( calendar != null ) {
+					if( !(ThisApplication.isCalendarManager(effectivePerson, calendar) 
+							|| ThisApplication.isCalendarPublisher(effectivePerson, unitNames, groupNames, calendar )) ) {//没权限
+						check = false;
+						Exception exception = new ExceptionInsufficientPermissions( "您没有权限从日历中删除日程事件.日历:" + calendar.getName() );
+						result.error( exception );
+					}
+				}				
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据用户查询组织和群组信息列表时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			if( StringUtils.isEmpty( calendar_Event.getRepeatMasterId() ) ) {
+				check = false;
+				Exception exception = new ExceptionEventPropertyEmpty("重复事件主体ID(repeatMasterId)");
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			if( StringUtils.isEmpty( calendar_Event.getRecurrenceRule() ) ) {
+				check = false;
+				Exception exception = new ExceptionEventPropertyEmpty("重复规则(recurrenceRule)");
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			try {
+				new_Event = Wi.copier.copy( wi );
+				new_Event.setId( id );
+				new_Event.setRepeatMasterId( calendar_Event.getRepeatMasterId() );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统将用户传入的数据转换为日历事件信息对象时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ) {
+			PromptException exception = this.eventValidate( new_Event, calendar );
+			if( exception != null ) {
+				check = false;
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			try {
+				count = calendar_EventServiceAdv.updateAfterEventId( calendar_Event.getRepeatMasterId(), new_Event, effectivePerson );
+				wo.setValue( count );
+				result.setData( wo );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "更新指定事件之后所有的日程信息时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		return result;
+	}
+	
+public static class Wi extends Calendar_Event{
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>(JpaObject.FieldsUnmodify);
+		
+		public static WrapCopier< Wi, Calendar_Event > copier =  WrapCopierFactory.wi( Wi.class, Calendar_Event.class, null, null );	
+		
+		private String identity = null;
+
+		public String getIdentity() {
+			return identity;
+		}
+
+		public void setIdentity(String identity) {
+			this.identity = identity;
+		}
+	}
+	
+	public static class Wo extends WrapInteger {
+	}
+}

+ 179 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionUpdateSingleEventWithId.java

@@ -0,0 +1,179 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.annotation.AuditLog;
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.exception.PromptException;
+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.calendar.assemble.control.ExceptionWrapInConvert;
+import com.x.calendar.assemble.control.ThisApplication;
+import com.x.calendar.core.entity.Calendar;
+import com.x.calendar.core.entity.Calendar_Event;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 根据事件ID更新单个日程事件信息
+ * 
+ * @author O2LEE
+ *
+ */
+public class ActionUpdateSingleEventWithId extends BaseAction {
+	
+	private static Logger logger = LoggerFactory.getLogger( ActionUpdateSingleEventWithId.class );
+
+	@AuditLog(operation = "修改日程事件")
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id, JsonElement jsonElement ) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wi wi = null;
+		Calendar calendar = null;
+		Calendar_Event calendar_Event = null;
+		Calendar_Event new_Event = null;
+		List<String> unitNames = null;
+		List<String> groupNames = null;
+		String personName = effectivePerson.getDistinguishedName();
+		Boolean check = true;
+		
+		try {
+			wi = this.convertToWrapIn( jsonElement, Wi.class );
+		} catch (Exception e ) {
+			check = false;
+			Exception exception = new ExceptionWrapInConvert( e, jsonElement );
+			result.error( exception );
+			logger.error( e, effectivePerson, request, null);
+		}
+		
+		if( check ){
+			if( StringUtils.isEmpty( id ) ){
+				check = false;
+				Exception exception = new ExceptionEventPropertyEmpty("ID");
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			try {
+				calendar_Event = calendar_EventServiceAdv.get( id );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历记录信息时发生异常.ID:" + id );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			if( calendar_Event == null ) {
+				check = false;
+				Exception exception = new ExceptionEventNotExists( id );
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			if( StringUtils.isNotEmpty( calendar_Event.getCalendarId() )) {
+				try {
+					calendar = calendarServiceAdv.get( calendar_Event.getCalendarId() );
+					if( calendar == null ) {
+						check = false;
+						Exception exception = new ExceptionCalendarNotExists( calendar_Event.getCalendarId() );
+						result.error( exception );
+					}
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历信息时发生异常.ID:" + calendar_Event.getCalendarId() );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}
+		}
+		
+		if( check && !ThisApplication.isCalendarSystemManager(effectivePerson) ) {
+			//判断用户权限
+			try {
+				unitNames = userManagerService.listUnitNamesWithPerson(personName);
+				groupNames = userManagerService.listGroupNamesByPerson(personName);
+				if( calendar != null ) {
+					if( !(ThisApplication.isCalendarManager(effectivePerson, calendar) 
+							|| ThisApplication.isCalendarPublisher(effectivePerson, unitNames, groupNames, calendar )) ) {//没权限
+						check = false;
+						Exception exception = new ExceptionInsufficientPermissions( "您没有权限从日历中删除日程事件.日历:" + calendar.getName() );
+						result.error( exception );
+					}
+				}				
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据用户查询组织和群组信息列表时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			try {
+				new_Event = Wi.copier.copy( wi );
+				new_Event.setId( calendar_Event.getId() );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统将用户传入的数据转换为日历事件信息对象时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+
+		if( check ) {
+			PromptException exception = this.eventValidate( new_Event, calendar );
+			if( exception != null ) {
+				check = false;
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			try {
+				calendar_Event = calendar_EventServiceAdv.updateSingleEvent( new_Event, effectivePerson );
+				result.setData( new Wo( calendar_Event.getId() ) );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "更新单个日程信息时发生异常.ID:" + id );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		return result;
+	}
+	
+	public static class Wi extends Calendar_Event{
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>(JpaObject.FieldsUnmodify);
+		
+		public static WrapCopier< Wi, Calendar_Event > copier =  WrapCopierFactory.wi( Wi.class, Calendar_Event.class, null, null );	
+		
+		private String identity = null;
+
+		public String getIdentity() {
+			return identity;
+		}
+
+		public void setIdentity(String identity) {
+			this.identity = identity;
+		}
+	}
+	
+	public static class Wo extends WoId {
+		public Wo( String id ) {
+			setId( id );
+		}
+	}
+}

+ 198 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ActionUpdateWithMaster.java

@@ -0,0 +1,198 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.annotation.AuditLog;
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+import com.x.base.core.project.exception.PromptException;
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.jaxrs.WrapInteger;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.calendar.assemble.control.ExceptionWrapInConvert;
+import com.x.calendar.assemble.control.ThisApplication;
+import com.x.calendar.core.entity.Calendar;
+import com.x.calendar.core.entity.Calendar_Event;
+import org.apache.commons.lang3.StringUtils;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 更新所有重复日程事件
+ * 1、更新当前日程事件对应的重复主体信息 RepeatMaster信息
+ * 2、删除该RepeatMaster已经生成的所有日程事件
+ * 3、删除该事件重复主体信息中所有的已经生成的月份信息
+ * @author O2LEE
+ *
+ */
+public class ActionUpdateWithMaster extends BaseAction {
+	
+	private static Logger logger = LoggerFactory.getLogger( ActionUpdateWithMaster.class );
+
+	@AuditLog(operation = "修改日程事件")
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id, JsonElement jsonElement ) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wi wi = null;
+		Wo wo = new Wo();
+		Calendar calendar = null;
+		Calendar_Event calendar_Event = null;
+		Calendar_Event new_Event = null;
+		Integer count = null;
+		List<String> unitNames = null;
+		List<String> groupNames = null;
+		String personName = effectivePerson.getDistinguishedName();
+		Boolean check = true;
+		
+		try {
+			wi = this.convertToWrapIn( jsonElement, Wi.class );
+		} catch (Exception e ) {
+			check = false;
+			Exception exception = new ExceptionWrapInConvert( e, jsonElement );
+			result.error( exception );
+			logger.error( e, effectivePerson, request, null);
+		}
+		
+		if( check ){
+			if( StringUtils.isEmpty( id ) ){
+				check = false;
+				Exception exception = new ExceptionEventPropertyEmpty("ID");
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			try {
+				calendar_Event = calendar_EventServiceAdv.get( id );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历记录信息时发生异常.ID:" + id );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			if( calendar_Event == null ) {
+				check = false;
+				Exception exception = new ExceptionEventNotExists( id );
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			if( StringUtils.isNotEmpty( calendar_Event.getCalendarId() )) {
+				try {
+					calendar = calendarServiceAdv.get( calendar_Event.getCalendarId() );
+					if( calendar == null ) {
+						check = false;
+						Exception exception = new ExceptionCalendarNotExists( calendar_Event.getCalendarId() );
+						result.error( exception );
+					}
+				} catch (Exception e) {
+					check = false;
+					Exception exception = new ExceptionEventProcess( e, "系统根据ID查询指定日历信息时发生异常.ID:" + calendar_Event.getCalendarId() );
+					result.error( exception );
+					logger.error( e, effectivePerson, request, null);
+				}
+			}
+		}
+		
+		if( check && !ThisApplication.isCalendarSystemManager(effectivePerson) ) {
+			//判断用户权限
+			try {
+				unitNames = userManagerService.listUnitNamesWithPerson(personName);
+				groupNames = userManagerService.listGroupNamesByPerson(personName);
+				if( calendar != null ) {
+					if( !(ThisApplication.isCalendarManager(effectivePerson, calendar) 
+							|| ThisApplication.isCalendarPublisher(effectivePerson, unitNames, groupNames, calendar )) ) {//没权限
+						check = false;
+						Exception exception = new ExceptionInsufficientPermissions( "您没有权限从日历中删除日程事件.日历:" + calendar.getName() );
+						result.error( exception );
+					}
+				}				
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统根据用户查询组织和群组信息列表时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ){
+			if( StringUtils.isEmpty( calendar_Event.getRepeatMasterId() ) ) {
+				check = false;
+				Exception exception = new ExceptionEventPropertyEmpty("重复事件主体ID(repeatMasterId)");
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			if( StringUtils.isEmpty( calendar_Event.getRecurrenceRule() ) ) {
+				check = false;
+				Exception exception = new ExceptionEventPropertyEmpty("重复规则(recurrenceRule)");
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			try {
+				new_Event = Wi.copier.copy( wi );
+				new_Event.setId( id );
+				new_Event.setRepeatMasterId( calendar_Event.getRepeatMasterId() );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "系统将用户传入的数据转换为日历事件信息对象时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		
+		if( check ) {
+			PromptException exception = this.eventValidate( new_Event, calendar );
+			if( exception != null ) {
+				check = false;
+				result.error( exception );
+			}
+		}
+		
+		if( check ){
+			try {
+				count = calendar_EventServiceAdv.updateWithMaster( calendar_Event.getRepeatMasterId(), new_Event, effectivePerson);
+				wo.setValue( count );
+				result.setData( wo );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionEventProcess( e, "更新所有重复的日程信息时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		return result;
+	}
+	
+public static class Wi extends Calendar_Event{
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>(JpaObject.FieldsUnmodify);
+		
+		public static WrapCopier< Wi, Calendar_Event > copier =  WrapCopierFactory.wi( Wi.class, Calendar_Event.class, null, null );	
+		
+		private String identity = null;
+
+		public String getIdentity() {
+			return identity;
+		}
+
+		public void setIdentity(String identity) {
+			this.identity = identity;
+		}
+	}
+	
+	public static class Wo extends WrapInteger {
+	}
+}

+ 197 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/BaseAction.java

@@ -0,0 +1,197 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import java.util.Date;
+import java.util.List;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.x.base.core.project.exception.PromptException;
+import com.x.base.core.project.jaxrs.StandardJaxrsAction;
+import com.x.base.core.project.tools.ListTools;
+import com.x.calendar.assemble.control.service.CalendarServiceAdv;
+import com.x.calendar.assemble.control.service.Calendar_EventRepeatMasterServiceAdv;
+import com.x.calendar.assemble.control.service.Calendar_EventServiceAdv;
+import com.x.calendar.assemble.control.service.UserManagerService;
+import com.x.calendar.common.date.DateOperation;
+import com.x.calendar.core.entity.Calendar;
+import com.x.calendar.core.entity.Calendar_Event;
+
+import net.fortuna.ical4j.model.property.RRule;
+
+public class BaseAction extends StandardJaxrsAction{
+	
+	protected UserManagerService userManagerService = new UserManagerService();
+	protected CalendarServiceAdv calendarServiceAdv = new CalendarServiceAdv();
+	protected Calendar_EventServiceAdv calendar_EventServiceAdv = new Calendar_EventServiceAdv();
+	protected Calendar_EventRepeatMasterServiceAdv calendar_RepeatedMasterServiceAdv = new Calendar_EventRepeatMasterServiceAdv();
+	protected static DateOperation dateOperation = new DateOperation();
+
+	/**
+	 * 对日历事件信息进行验证,给出正确的提示信息
+	 * @param event
+	 * @param calendar
+	 * @return
+	 * @throws Exception
+	 */
+	protected PromptException eventValidate( Calendar_Event event, Calendar calendar ) throws Exception {
+		
+		//日历ID不能为空
+		if( StringUtils.isEmpty( event.getCalendarId() ) ){
+			return new ExceptionEventPropertyEmpty("日历ID(calendarId)");
+		}
+		
+		if( calendar == null ) {
+			try {
+				calendar = calendarServiceAdv.get( event.getCalendarId() );
+				if( calendar == null ) {
+					return new ExceptionCalendarNotExists( event.getCalendarId() );
+				}
+			} catch (Exception e) {
+				e.printStackTrace();
+				return new ExceptionEventProcess( e, "系统根据ID查询指定日历信息时发生异常.ID:" + event.getCalendarId() );
+			}
+		}
+		
+		//事件继承日历的可见范围
+		if( ListTools.isNotEmpty( calendar.getViewablePersonList() )) {
+			for( String value : calendar.getViewablePersonList() ) {
+				event.addViewablePerson( value );
+			}
+		}
+		if( ListTools.isNotEmpty( calendar.getViewableUnitList() )) {
+			for( String value : calendar.getViewableUnitList() ) {
+				event.addViewableUnit( value );
+			}
+		}
+		if( ListTools.isNotEmpty( calendar.getViewableGroupList() )) {
+			for( String value : calendar.getViewableGroupList() ) {
+				event.addViewableGroup( value );
+			}
+		}
+		
+		//事件继承日历的管理范围
+		if( ListTools.isNotEmpty( calendar.getManageablePersonList() )) {
+			for( String value : calendar.getManageablePersonList() ) {
+				event.addManageablePerson( value );
+			}
+		}
+		
+		//事件继承日历的公开形式
+		event.setIsPublic( calendar.getIsPublic() );
+		
+		//默认使用日历的颜色
+		if( StringUtils.isEmpty( event.getColor() ) ){
+			event.setColor( calendar.getColor() );
+		}
+				
+		//设置中否公开日历事件,继承日历的设置
+		event.setIsPublic( calendar.getIsPublic() );
+		
+		//标题不能为空
+		if( StringUtils.isEmpty( event.getTitle() ) ){
+			return new ExceptionEventPropertyEmpty("事件标题(title)");
+		}
+		
+		if( event.getStartTime() == null ) {
+			event.setStartTime( new Date() );
+		}
+		
+		if( StringUtils.isEmpty(event.getEventType())) {
+			event.setEventType ("CAL_EVENT");
+		}
+		
+		if( StringUtils.isEmpty(event.getTargetType())) {
+			event.setTargetType ("PERSON");
+		}
+		
+		if( StringUtils.isEmpty( event.getSource()) ){
+			event.setSource( "PERSONAL" );
+		}
+		
+		//开始和结束时间不能为空,和是否全天进行验证
+		if( event.getIsAllDayEvent() ) {
+			//自动填入开始和结束时间,以传入的开始时间为准
+			event.setStartTime( dateOperation.getBeginTimeInDay( event.getStartTime() ) );
+			event.setEndTime( dateOperation.getEndTimeInDay( event.getEndTime() ) );
+		}else {
+			if( event.getEndTime() == null ) {
+				event.setEndTime( new Date() );
+			}
+			if( event.getStartTime().after(event.getEndTime() )) {
+				//交换位置
+				Date temp = event.getStartTime();
+				event.setStartTime( event.getEndTime() );
+				event.setEndTime( temp );
+			}
+		}
+		
+		event.setStartTimeStr(dateOperation.getDateFromDate(event.getStartTime(), "yyyy-MM-dd HH:mm:ss"));
+		event.setEndTimeStr(dateOperation.getDateFromDate(event.getEndTime(), "yyyy-MM-dd HH:mm:ss"));
+		
+		List<String> days = dateOperation.listDaysBetweenDate( event.getStartTime(), event.getEndTime() );
+		if( ListTools.isNotEmpty( days )) {
+			event.setDaysOfDuration( days.size() );
+		}
+		if( event.getDaysOfDuration() == 1 ) {
+			//看看是不是全天,,如果不是全天就设置为0
+			if( !event.getIsAllDayEvent() ) {
+				event.setDaysOfDuration( 0 );
+			}
+		}
+		
+		//对重复规则进行验证
+		if( "TASK_EVENT".equalsIgnoreCase( event.getEventType() )) {
+			//任务事件不能重复,只有日程事件CAL_EVENT可以有重复规则
+			if( StringUtils.isNotEmpty( event.getRecurrenceRule() )) {
+				return new ExceptionTaskEventCanNotRecurrence();
+			}
+			if( StringUtils.isNotEmpty( event.getRepeatMasterId() )) {
+				return new ExceptionTaskEventCanNotRepeatMaster( event.getRepeatMasterId() ) ;
+			}
+		}
+
+		//如果有重复规则时,需要验证规则是否正确
+		if( StringUtils.isNotEmpty( event.getRecurrenceRule() )) {
+			//转换为RRule
+			try{
+				new RRule(event.getRecurrenceRule());
+			}catch( Exception e) {
+				return new ExceptionEventRRuleInvalid(event.getRecurrenceRule());
+			}
+		}
+		
+		//对提醒设置进行验证
+		if( StringUtils.isEmpty( event.getValarmTime_config() ) || "0,0,0,0".equalsIgnoreCase( event.getValarmTime_config().trim() )) {
+			event.setValarmTime_config("0,0,0,0");
+			event.setAlarm( false );
+			event.setAlarmTime( null );
+			event.setValarm_description( null );
+			event.setValarm_mailto( null );
+			event.setValarm_Summary( null );
+		}else {			
+			event.setAlarm( true );
+			if( StringUtils.isEmpty( event.getValarm_Summary() )) {
+				event.setValarm_Summary( "日程提醒" );
+			}
+			//计算提醒时间,以开始时间为基准
+			String[] alarm_config = event.getValarmTime_config().trim().split(","); 
+			if( alarm_config.length == 4 ) {
+				int day, hour, min, sec = 0;
+				Date alarmTime = null;
+				try {
+					day = Integer.parseInt( alarm_config[0].trim() );
+					hour = Integer.parseInt( alarm_config[01].trim() );
+					min = Integer.parseInt( alarm_config[2].trim() );
+					sec = Integer.parseInt( alarm_config[3].trim() );
+					alarmTime = dateOperation.caculateNewDate( event.getStartTime(), day, hour, min, sec );
+					event.setAlarmTime(alarmTime);
+				}catch( Exception e ) {
+					return new ExceptionEventAlarmConfigError("提醒配置应该为使用','分隔的数字。");
+				}				 
+			}else {
+				return new ExceptionEventAlarmConfigError("格式错误,正确格式:天,时,分,秒。");
+			}
+		}
+		return null;
+	}
+}

+ 318 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/Calendar_EventAction.java

@@ -0,0 +1,318 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.container.AsyncResponse;
+import javax.ws.rs.container.Suspended;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+
+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.jaxrs.proxy.StandardJaxrsActionProxy;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.calendar.assemble.control.ThisApplication;
+
+@Path("event")
+@JaxrsDescribe("日历事件信息管理服务")
+public class Calendar_EventAction extends StandardJaxrsAction {
+
+	private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
+	private static Logger logger = LoggerFactory.getLogger(Calendar_EventAction.class);
+
+	@JaxrsMethodDescribe(value = "根据ID获取日历事件信息", action = ActionGet.class)
+	@GET
+	@Path("{id}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void get(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("日历事件信息ID") @PathParam("id") String id) {
+		ActionResult<ActionGet.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionGet) proxy.getProxy(ActionGet.class)).execute(request, effectivePerson, id);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionEventProcess(e, "根据ID获取日历事件信息时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "根据ID获取日历事件信息的RFC内容", action = ActionGetRFCContent.class)
+	@GET
+	@Path("rfc/{id}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void getRFC(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("日历事件信息ID") @PathParam("id") String id) {
+		ActionResult<ActionGetRFCContent.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionGetRFCContent) proxy.getProxy(ActionGetRFCContent.class)).execute(request,
+						effectivePerson, id);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionEventProcess(e, "根据ID获取日历事件信息的RFC内容时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "根据事件ID删除指定的日历事件信息", action = ActionDestroySingleEventWithId.class)
+	@DELETE
+	@Path("single/{eventId}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void destorySingleEvent(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("日历事件信息ID") @PathParam("eventId") String eventId) {
+		ActionResult<ActionDestroySingleEventWithId.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionDestroySingleEventWithId) proxy.getProxy(ActionDestroySingleEventWithId.class))
+						.execute(request, effectivePerson, eventId);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionEventProcess(e, "根据ID删除日历事件信息时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "根据指定事件ID删除所有的重复日历事件信息", action = ActionDestroyWithMaster.class)
+	@DELETE
+	@Path("all/{eventId}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void destoryAllEventsWithRepeatMaster(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request,
+			@JaxrsParameterDescribe("日历事件信息ID") @PathParam("eventId") String eventId) {
+		ActionResult<ActionDestroyWithMaster.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionDestroyWithMaster) proxy.getProxy(ActionDestroyWithMaster.class)).execute(request,
+						effectivePerson, eventId);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionEventProcess(e, "根据指定事件ID删除所有的重复日历事件信息时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "删除重复日程事件中指定事件开始后续所有的日程事件信息", action = ActionDestroyAfterEventId.class)
+	@DELETE
+	@Path("after/{eventId}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void destoryAfterEvent(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("日历事件信息ID") @PathParam("eventId") String eventId) {
+		ActionResult<ActionDestroyAfterEventId.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionDestroyAfterEventId) proxy.getProxy(ActionDestroyAfterEventId.class)).execute(request,
+						effectivePerson, eventId);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionEventProcess(e, "删除重复日程事件中指定事件开始后续所有的日程事件信息时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "根据条件查询日历事件信息列表", action = ActionListWithCondition.class)
+	@PUT
+	@Path("list/filter")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void listWithFilter(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("查询条件") JsonElement jsonElement) {
+		ActionResult<ActionListWithCondition.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionListWithCondition) proxy.getProxy(ActionListWithCondition.class)).execute(request,
+						effectivePerson, jsonElement);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionEventProcess(e, "根据条件查询日历事件信息列表!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "根据条件查询日历事件信息列表(返回简单列表)", action = ActionSimpleListWithCondition.class)
+	@PUT
+	@Path("list/filter/sample")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void listWithFilterSample(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("查询条件") JsonElement jsonElement) {
+		ActionResult<List<ActionSimpleListWithCondition.Wo>> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionSimpleListWithCondition) proxy.getProxy(ActionSimpleListWithCondition.class))
+						.execute(request, effectivePerson, jsonElement);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionEventProcess(e, "根据条件查询日历事件信息列表!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "创建一个新的日历事件信息", action = ActionCreate.class)
+	@POST
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void create(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("日历事件信息") JsonElement jsonElement) {
+		ActionResult<ActionCreate.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionCreate) proxy.getProxy(ActionCreate.class)).execute(request, effectivePerson,
+						jsonElement);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionEventProcess(e, "新建或者更新日历事件信息时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "更新事件所有的重复日程事件", action = ActionUpdateWithMaster.class)
+	@Path("update/all/{eventId}")
+	@PUT
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void updateAllEventsWithRepeatMaster(
+			@JaxrsParameterDescribe("日历事件信息ID") @PathParam("eventId") String eventId,
+			@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("日历事件信息") JsonElement jsonElement) {
+		ActionResult<ActionUpdateWithMaster.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionUpdateWithMaster) proxy.getProxy(ActionUpdateWithMaster.class)).execute(request,
+						effectivePerson, eventId, jsonElement);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionEventProcess(e, "更新日历事件信息时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "更新重复日程事件中指定事件开始后续所有的日程事件信息", action = ActionUpdateAfterEventId.class)
+	@Path("update/after/{eventId}")
+	@PUT
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void updateAfterEvent(@JaxrsParameterDescribe("日历事件信息ID") @PathParam("eventId") String eventId,
+			@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("日历事件信息") JsonElement jsonElement) {
+		ActionResult<ActionUpdateAfterEventId.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionUpdateAfterEventId) proxy.getProxy(ActionUpdateAfterEventId.class)).execute(request,
+						effectivePerson, eventId, jsonElement);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionEventProcess(e, "更新日历事件信息时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "根据事件ID更新单个日程事件信息", action = ActionUpdateSingleEventWithId.class)
+	@Path("update/single/{eventId}")
+	@PUT
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void updateSingleEvent(@JaxrsParameterDescribe("日历事件信息ID") @PathParam("eventId") String eventId,
+			@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("日历事件信息") JsonElement jsonElement) {
+		ActionResult<ActionUpdateSingleEventWithId.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionUpdateSingleEventWithId) proxy.getProxy(ActionUpdateSingleEventWithId.class))
+						.execute(request, effectivePerson, eventId, jsonElement);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionEventProcess(e, "更新日历事件信息时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+}

+ 50 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/Calendar_EventMessageAction.java

@@ -0,0 +1,50 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.container.AsyncResponse;
+import javax.ws.rs.container.Suspended;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+
+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.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.proxy.StandardJaxrsActionProxy;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.calendar.assemble.control.ThisApplication;
+
+@Path("message")
+@JaxrsDescribe("消息处理")
+public class Calendar_EventMessageAction extends BaseAction {
+
+	private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
+	private static Logger logger = LoggerFactory.getLogger(Calendar_EventMessageAction.class);
+
+	@JaxrsMethodDescribe(value = "接收日历消息", action = ActionMessageReceive.class)
+	@POST
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void messageReceive(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			JsonElement jsonElement) {
+		ActionResult<ActionMessageReceive.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = ((ActionMessageReceive) proxy.getProxy(ActionMessageReceive.class)).execute(request,
+					effectivePerson, jsonElement);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, jsonElement);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionCalendarNotExists.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionCalendarNotExists extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionCalendarNotExists( String id ) {
+		super("日历信息不存在.ID:" + id );
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionCalendarPropertyEmpty.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionCalendarPropertyEmpty extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionCalendarPropertyEmpty( String name ) {
+		super("操作传入的日历属性'"+name+"'为空,无法进行保存操作.");
+	}
+}

+ 16 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionEventAlarmConfigError.java

@@ -0,0 +1,16 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionEventAlarmConfigError extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionEventAlarmConfigError() {
+		super("事件提醒时间配置不合法,请检查提醒设置。");
+	}
+	
+	ExceptionEventAlarmConfigError( String message ) {
+		super("事件提醒时间配置不合法," + message );
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionEventIsNotRecurrenceEvent.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionEventIsNotRecurrenceEvent extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionEventIsNotRecurrenceEvent( String id ) {
+		super("日程事件不是重复事件。ID:" + id);
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionEventNotExists.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionEventNotExists extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionEventNotExists( String id ) {
+		super("指定的日历事件信息不存在.ID:" + id );
+	}
+}

+ 16 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionEventProcess.java

@@ -0,0 +1,16 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionEventProcess extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionEventProcess( Throwable e, String message ) {
+		super("系统进行日历事件信息处理时发生异常!message:" + message, e );
+	}
+	
+	ExceptionEventProcess( String message ) {
+		super("系统进行日历事件信息处理时发生异常!message:" + message );
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionEventPropertyEmpty.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionEventPropertyEmpty extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionEventPropertyEmpty( String title ) {
+		super("事件["+ title +"]属性为空,数据操作异常。");
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionEventRRuleInvalid.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionEventRRuleInvalid extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionEventRRuleInvalid( String rule ) {
+		super("日程事件重复规则不合法。RRule:" + rule);
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionEventRepeatMasterNotExists.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionEventRepeatMasterNotExists extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionEventRepeatMasterNotExists( String masterId ) {
+		super("指定的日历事件重复宿主信息不存在.MASTERID:" + masterId );
+	}
+}

+ 16 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionInsufficientPermissions.java

@@ -0,0 +1,16 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.x.base.core.project.exception.PromptException;
+
+public class ExceptionInsufficientPermissions extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	public ExceptionInsufficientPermissions( String name, String role ) {
+		super("操作权限不足。Name:" + name + ", Role:" + role );
+	}
+	
+	public ExceptionInsufficientPermissions( String message ) {
+		super("操作权限不足!" + message );
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionMessageProcess.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionMessageProcess extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionMessageProcess( Throwable e, String message ) {
+		super("系统进行日历事件消息息处理时发生异常!message:" + message, e );
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionTaskEventCanNotRecurrence.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionTaskEventCanNotRecurrence extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionTaskEventCanNotRecurrence() {
+		super("任务事件不允许进行重复,请不要进行重复规则设置.");
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/event/ExceptionTaskEventCanNotRepeatMaster.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.event;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionTaskEventCanNotRepeatMaster extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionTaskEventCanNotRepeatMaster( String id ) {
+		super("任务事件不允许进行重复,请不要进行重复规则设置.REPEATMASTERID:" + id);
+	}
+}

+ 72 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ActionGet.java

@@ -0,0 +1,72 @@
+package com.x.calendar.assemble.control.jaxrs.setting;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+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.calendar.core.entity.Calendar_Setting;
+
+public class ActionGet extends BaseAction {
+	
+	private Logger logger = LoggerFactory.getLogger( ActionGet.class );
+	
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id ) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wo wrap = null;
+		Calendar_Setting calendar_Setting = null;
+		Boolean check = true;
+		
+		if( check ){
+			if( id == null || id.isEmpty() ){
+				check = false;
+				Exception exception = new ExceptionSettingIdEmpty();
+				result.error( exception );
+			}
+		}
+
+		if( check ){
+			try {
+				calendar_Setting = calendar_SettingServiceAdv.get( id );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionSettingInfoProcess( e, "系统根据ID查询指定考勤系统配置信息时发生异常.ID:" + id );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		if( check ){
+			try {
+				wrap = Wo.copier.copy( calendar_Setting );
+				if( wrap.getIsLob() ) {
+					//查询LOB值
+					String lobValue = calendar_SettingServiceAdv.getLobValueWithId( wrap.getId() );
+					wrap.setConfigValue( lobValue );
+				}
+				result.setData( wrap );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionSettingInfoProcess( e, "将所有查询到的考勤配置信息对象转换为可以输出的信息时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		return result;
+	}
+
+	public static class Wo extends Calendar_Setting  {
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>();
+		
+		public static WrapCopier<Calendar_Setting, Wo> copier = WrapCopierFactory.wo( Calendar_Setting.class, Wo.class, null,Wo.Excludes);
+	}
+
+}

+ 71 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ActionGetWithCode.java

@@ -0,0 +1,71 @@
+package com.x.calendar.assemble.control.jaxrs.setting;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+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.calendar.core.entity.Calendar_Setting;
+
+public class ActionGetWithCode extends BaseAction {
+	
+	private Logger logger = LoggerFactory.getLogger( ActionGetWithCode.class );
+	
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String code ) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wo wrap = null;
+		Calendar_Setting calendar_Setting = null;
+		Boolean check = true;
+		
+		if( check ){
+			if( code == null || code.isEmpty() ){
+				check = false;
+				Exception exception = new ExceptionSettingCodeEmpty();
+				result.error( exception );
+			}
+		}
+		if( check ){
+			try {
+				calendar_Setting = calendar_SettingServiceAdv.getByCode( code );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionSettingInfoProcess( e, "系统根据指定的编码'CODE'查询所有符合条件的考勤系统设置信息列表时发生异常.Code:" + code );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		if( check ){
+			try {
+				wrap = Wo.copier.copy( calendar_Setting );
+				if( wrap.getIsLob() ) {
+					//查询LOB值
+					String lobValue = calendar_SettingServiceAdv.getLobValueWithId( wrap.getId() );
+					wrap.setConfigValue( lobValue );
+				}
+				result.setData( wrap );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionSettingInfoProcess( e, "将所有查询到的考勤配置信息对象转换为可以输出的信息时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		return result;
+	}
+
+	public static class Wo extends Calendar_Setting  {
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>();
+		
+		public static WrapCopier<Calendar_Setting, Wo> copier = WrapCopierFactory.wo( Calendar_Setting.class, Wo.class, null,Wo.Excludes);
+	}
+
+}

+ 34 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ActionIsManager.java

@@ -0,0 +1,34 @@
+package com.x.calendar.assemble.control.jaxrs.setting;
+
+import javax.servlet.http.HttpServletRequest;
+
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.http.WrapOutBoolean;
+
+public class ActionIsManager extends BaseAction {
+	
+	protected ActionResult<WrapOutBoolean> execute( HttpServletRequest request, EffectivePerson effectivePerson ) throws Exception {
+		ActionResult<WrapOutBoolean> result = new ActionResult<>();
+		Wo wo = new Wo();
+		Boolean hasRole = false;
+		
+		if(effectivePerson.isManager()) {
+			hasRole = true;
+		}else {
+			try {
+				hasRole = userManagerService.isHasPlatformRole(effectivePerson.getDistinguishedName(), "CalendarManager");
+			}catch( Exception e) {
+				e.printStackTrace();
+			}
+		}
+		
+		wo.setValue( hasRole );
+		result.setData(wo);
+		return result;
+	}
+
+	public static class Wo extends WrapOutBoolean  {
+	}
+
+}

+ 68 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ActionListAll.java

@@ -0,0 +1,68 @@
+package com.x.calendar.assemble.control.jaxrs.setting;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+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.calendar.core.entity.Calendar_Setting;
+
+public class ActionListAll extends BaseAction {
+	
+	private Logger logger = LoggerFactory.getLogger( ActionListAll.class );
+	
+	protected ActionResult<List<Wo>> execute( HttpServletRequest request, EffectivePerson effectivePerson ) throws Exception {
+		ActionResult<List<Wo>> result = new ActionResult<>();
+		String lobValue = null;
+		List<Wo> wraps = null;
+		List<Calendar_Setting> report_S_SettingList = null;
+		Boolean check = true;
+		
+		if( check ){
+			try {
+				report_S_SettingList = calendar_SettingServiceAdv.listAll();
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionSettingInfoProcess( e, "系统查询所有考勤系统设置信息列表时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		if( check ){
+			try {
+				wraps = Wo.copier.copy( report_S_SettingList );
+				if( wraps != null && !wraps.isEmpty() ) {
+					for( Wo wo : wraps) {
+						if( wo.getIsLob() ) {
+							//查询LOB值
+							lobValue = calendar_SettingServiceAdv.getLobValueWithId( wo.getId() );
+							wo.setConfigValue( lobValue );
+						}
+					}
+				}
+				result.setData(wraps);
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionSettingInfoProcess( e, "将所有查询到的考勤配置信息对象转换为可以输出的信息时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		return result;
+	}
+	
+	public static class Wo extends Calendar_Setting  {
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>();
+		
+		public static WrapCopier<Calendar_Setting, Wo> copier = WrapCopierFactory.wo( Calendar_Setting.class, Wo.class, null,Wo.Excludes);
+	}
+}

+ 104 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ActionSave.java

@@ -0,0 +1,104 @@
+package com.x.calendar.assemble.control.jaxrs.setting;
+
+import com.google.gson.JsonElement;
+import com.x.base.core.entity.JpaObject;
+import com.x.base.core.project.annotation.AuditLog;
+import com.x.base.core.project.bean.WrapCopier;
+import com.x.base.core.project.bean.WrapCopierFactory;
+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.calendar.assemble.control.ExceptionWrapInConvert;
+import com.x.calendar.core.entity.Calendar_Setting;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.ArrayList;
+import java.util.List;
+
+public class ActionSave extends BaseAction {
+	
+	private static Logger logger = LoggerFactory.getLogger( ActionSave.class );
+
+	@AuditLog(operation = "保存系统设置")
+	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, JsonElement jsonElement ) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wi wrapIn = null;
+		Calendar_Setting report_S_Setting = new Calendar_Setting();
+		Boolean check = true;
+		
+		try {
+			wrapIn = this.convertToWrapIn( jsonElement, Wi.class );
+		} catch (Exception e ) {
+			check = false;
+			Exception exception = new ExceptionWrapInConvert( e, jsonElement );
+			result.error( exception );
+			logger.error( e, effectivePerson, request, null);
+		}
+		if( check ){
+			if( wrapIn.getConfigCode() == null || wrapIn.getConfigCode().isEmpty() ){
+				check = false;
+				Exception exception = new ExceptionSettingCodeEmpty();
+				result.error( exception );
+			}
+		}
+		if( check ){
+			if( wrapIn.getConfigName() == null || wrapIn.getConfigName().isEmpty() ){
+				check = false;
+				Exception exception = new ExceptionSettingNameEmpty();
+				result.error( exception );
+			}
+		}
+		if( check ){
+			try {
+				report_S_Setting = Wi.copier.copy( wrapIn );
+				if( wrapIn.getId() != null && !wrapIn.getId().isEmpty() ){
+					report_S_Setting.setId( wrapIn.getId() );
+				}
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionSettingInfoProcess( e, "系统将用户传入的数据转换为考勤系统配置对象时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		if( check ){
+			try {
+				report_S_Setting = calendar_SettingServiceAdv.save( report_S_Setting );
+				result.setData( new Wo( report_S_Setting.getId() ) );
+			} catch (Exception e) {
+				check = false;
+				Exception exception = new ExceptionSettingInfoProcess( e, "保存考勤系统配置信息时发生异常." );
+				result.error( exception );
+				logger.error( e, effectivePerson, request, null);
+			}
+		}
+		return result;
+	}
+	
+	public static class Wi extends Calendar_Setting {
+		
+		private static final long serialVersionUID = -5076990764713538973L;
+		
+		public static List<String> Excludes = new ArrayList<String>(JpaObject.FieldsUnmodify);
+		
+		public static WrapCopier< Wi, Calendar_Setting > copier = WrapCopierFactory.wi( Wi.class, Calendar_Setting.class, null, Wi.Excludes );
+		
+		private String identity = null;
+
+		public String getIdentity() {
+			return identity;
+		}
+
+		public void setIdentity(String identity) {
+			this.identity = identity;
+		}
+	}
+	
+	public static class Wo extends WoId {
+		public Wo( String id ) {
+			setId( id );
+		}
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/BaseAction.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.setting;
+
+import com.x.base.core.project.jaxrs.StandardJaxrsAction;
+import com.x.calendar.assemble.control.service.Calendar_SettingServiceAdv;
+import com.x.calendar.assemble.control.service.UserManagerService;
+
+public class BaseAction extends StandardJaxrsAction{
+	
+	protected Calendar_SettingServiceAdv calendar_SettingServiceAdv = new Calendar_SettingServiceAdv();
+	protected UserManagerService userManagerService = new UserManagerService();
+
+}

+ 158 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/CalendarSettingAction.java

@@ -0,0 +1,158 @@
+package com.x.calendar.assemble.control.jaxrs.setting;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.container.AsyncResponse;
+import javax.ws.rs.container.Suspended;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+
+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.http.WrapOutBoolean;
+import com.x.base.core.project.jaxrs.ResponseFactory;
+import com.x.base.core.project.jaxrs.StandardJaxrsAction;
+import com.x.base.core.project.jaxrs.proxy.StandardJaxrsActionProxy;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.calendar.assemble.control.ThisApplication;
+
+@Path("setting")
+@JaxrsDescribe("系统设置信息管理服务")
+public class CalendarSettingAction extends StandardJaxrsAction {
+
+	private StandardJaxrsActionProxy proxy = new StandardJaxrsActionProxy(ThisApplication.context());
+	private static Logger logger = LoggerFactory.getLogger(CalendarSettingAction.class);
+
+	@JaxrsMethodDescribe(value = "获取所有系统配置信息列表", action = ActionListAll.class)
+	@GET
+	@Path("list/all")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void listAllReportSetting(@Suspended final AsyncResponse asyncResponse,
+			@Context HttpServletRequest request) {
+		ActionResult<List<ActionListAll.Wo>> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionListAll) proxy.getProxy(ActionListAll.class)).execute(request, effectivePerson);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionSettingInfoProcess(e, "获取所有系统配置信息列表时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "根据ID获取系统配置信息", action = ActionGet.class)
+	@GET
+	@Path("{id}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void get(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("系统配置信息ID") @PathParam("id") String id) {
+		ActionResult<ActionGet.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionGet) proxy.getProxy(ActionGet.class)).execute(request, effectivePerson, id);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionSettingInfoProcess(e, "根据ID获取系统配置信息时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "根据Code获取系统配置信息", action = ActionGetWithCode.class)
+	@GET
+	@Path("code/{code}")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void getWithCode(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("系统配置信息编码") @PathParam("code") String code) {
+		ActionResult<ActionGetWithCode.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionGetWithCode) proxy.getProxy(ActionGetWithCode.class)).execute(request, effectivePerson,
+						code);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionSettingInfoProcess(e, "根据Code获取系统配置信息时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "判断当前用户是否有管理员权限", action = ActionIsManager.class)
+	@GET
+	@Path("ismanager")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void isManager(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request) {
+		ActionResult<WrapOutBoolean> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionIsManager) proxy.getProxy(ActionIsManager.class)).execute(request, effectivePerson);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionSettingInfoProcess(e, "判断当前用户是否有管理员权限时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+	@JaxrsMethodDescribe(value = "新建或者更新系统配置信息", action = ActionSave.class)
+	@POST
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void save(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
+			@JaxrsParameterDescribe("配置信息") JsonElement jsonElement) {
+		ActionResult<ActionSave.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		Boolean check = true;
+
+		if (check) {
+			try {
+				result = ((ActionSave) proxy.getProxy(ActionSave.class)).execute(request, effectivePerson, jsonElement);
+			} catch (Exception e) {
+				result = new ActionResult<>();
+				Exception exception = new ExceptionSettingInfoProcess(e, "新建或者更新系统配置信息时发生异常!");
+				result.error(exception);
+				logger.error(e, effectivePerson, request, null);
+			}
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ExceptionSettingCodeEmpty.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.setting;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionSettingCodeEmpty extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionSettingCodeEmpty() {
+		super("查询操作传入的设置编码Code为空,无法进行查询或者保存操作.");
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ExceptionSettingIdEmpty.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.setting;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionSettingIdEmpty extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionSettingIdEmpty() {
+		super("查询操作传入的参数Id为空,无法进行查询操作.");
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ExceptionSettingInfoProcess.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.setting;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionSettingInfoProcess extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionSettingInfoProcess( Throwable e, String message ) {
+		super("用户在进行设置信息处理时发生异常!message:" + message, e );
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ExceptionSettingNameEmpty.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.setting;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionSettingNameEmpty extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionSettingNameEmpty() {
+		super("查询操作传入的设置名称Name为空,无法进行查询或者保存操作.");
+	}
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/setting/ExceptionSettingNotExists.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.setting;
+
+import com.x.base.core.project.exception.PromptException;
+
+class ExceptionSettingNotExists extends PromptException {
+
+	private static final long serialVersionUID = 1859164370743532895L;
+
+	ExceptionSettingNotExists( String id ) {
+		super("指定的设置信息不存在.ID:" + id );
+	}
+}

+ 30 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/test/ActionTest1.java

@@ -0,0 +1,30 @@
+package com.x.calendar.assemble.control.jaxrs.test;
+
+import javax.servlet.http.HttpServletRequest;
+
+import com.x.base.core.project.http.ActionResult;
+import com.x.base.core.project.http.EffectivePerson;
+import com.x.base.core.project.jaxrs.WrapBoolean;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.calendar.assemble.control.ThisApplication;
+import com.x.calendar.assemble.control.schedule.AlarmTrigger;
+
+public class ActionTest1 extends BaseAction {
+
+	private Logger logger = LoggerFactory.getLogger(ActionTest1.class);
+
+	protected ActionResult<Wo> execute(HttpServletRequest request, EffectivePerson effectivePerson) throws Exception {
+		ActionResult<Wo> result = new ActionResult<>();
+		Wo wo = new Wo();
+		wo.setValue(true);
+		ThisApplication.context().scheduleLocal(AlarmTrigger.class,1);
+		result.setData(wo);
+		return result;
+	}
+
+	public static class Wo extends WrapBoolean {
+
+	}
+
+}

+ 12 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/test/BaseAction.java

@@ -0,0 +1,12 @@
+package com.x.calendar.assemble.control.jaxrs.test;
+
+import com.x.base.core.project.jaxrs.StandardJaxrsAction;
+import com.x.calendar.assemble.control.service.Calendar_SettingServiceAdv;
+import com.x.calendar.assemble.control.service.UserManagerService;
+
+public class BaseAction extends StandardJaxrsAction{
+	
+	protected Calendar_SettingServiceAdv calendar_SettingServiceAdv = new Calendar_SettingServiceAdv();
+	protected UserManagerService userManagerService = new UserManagerService();
+
+}

+ 45 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/jaxrs/test/TestAction.java

@@ -0,0 +1,45 @@
+package com.x.calendar.assemble.control.jaxrs.test;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.container.AsyncResponse;
+import javax.ws.rs.container.Suspended;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+
+import com.x.base.core.project.annotation.JaxrsDescribe;
+import com.x.base.core.project.annotation.JaxrsMethodDescribe;
+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;
+
+@Path("test")
+@JaxrsDescribe("测试")
+public class TestAction extends StandardJaxrsAction {
+
+	private static Logger logger = LoggerFactory.getLogger(TestAction.class);
+
+	@JaxrsMethodDescribe(value = "触发提醒", action = ActionTest1.class)
+	@GET
+	@Path("1")
+	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
+	@Consumes(MediaType.APPLICATION_JSON)
+	public void test1(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request) {
+		ActionResult<ActionTest1.Wo> result = new ActionResult<>();
+		EffectivePerson effectivePerson = this.effectivePerson(request);
+		try {
+			result = new ActionTest1().execute(request, effectivePerson);
+		} catch (Exception e) {
+			logger.error(e, effectivePerson, request, null);
+			result.error(e);
+		}
+		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
+	}
+}

+ 76 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/schedule/AlarmTrigger.java

@@ -0,0 +1,76 @@
+package com.x.calendar.assemble.control.schedule;
+
+import java.util.Date;
+import java.util.List;
+
+import org.quartz.JobExecutionContext;
+import org.quartz.JobExecutionException;
+
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.base.core.project.logger.Logger;
+import com.x.base.core.project.logger.LoggerFactory;
+import com.x.base.core.project.schedule.AbstractJob;
+import com.x.base.core.project.tools.ListTools;
+import com.x.calendar.assemble.control.Business;
+import com.x.calendar.assemble.control.factory.MessageFactory;
+import com.x.calendar.assemble.control.service.Calendar_EventServiceAdv;
+import com.x.calendar.core.entity.Calendar_Event;
+
+/**
+ * 查询需要提醒的日程或者事件,并且按要求发送提醒消息
+ * 
+ * @author O2LEE
+ *
+ */
+public class AlarmTrigger extends AbstractJob {
+
+	private static Logger logger = LoggerFactory.getLogger(AlarmTrigger.class);
+	protected Calendar_EventServiceAdv calendar_EventServiceAdv = new Calendar_EventServiceAdv();
+
+	@Override
+	public void schedule(JobExecutionContext jobExecutionContext) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			Business business = new Business(emc);
+			alarm(business);
+			logger.info("The trigger for calendar alarm execute completed." + new Date());
+		} catch (Exception e) {
+			logger.error(e);
+			throw new JobExecutionException(e);
+		}
+	}
+
+	/**
+	 * 执行日程事件提醒 1、查询需要提醒的日程事件ID列表 2、发送消息
+	 * 
+	 * @param business
+	 * @return
+	 * @throws Exception
+	 */
+	private boolean alarm(Business business) throws Exception {
+		// 1、查询需要提醒的日程事件ID列表 当前时间已经到达或者超过提醒时间,并且提醒标识为未提醒(false)
+		List<String> ids = null;
+		Calendar_Event calendar_Event = null;
+		try {
+			ids = calendar_EventServiceAdv.listNeedAlarmEventIds(new Date());
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		if (ListTools.isNotEmpty(ids)) {
+			try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+				for (String id : ids) {
+					calendar_Event = calendar_EventServiceAdv.get(id);
+					if (calendar_Event != null) {
+						MessageFactory.send_alarm(emc, calendar_Event);
+						logger.info("send message:{}.", calendar_Event.getTitle());
+					}
+				}
+			} catch (Exception e) {
+				throw e;
+			}
+			logger.info("The trigger sent " + ids.size() + " calendar alarms.");
+		}
+		return false;
+	}
+
+}

+ 103 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/schedule/CheckEventComment.java

@@ -0,0 +1,103 @@
+package com.x.calendar.assemble.control.schedule;
+
+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.schedule.AbstractJob;
+import com.x.base.core.project.tools.ListTools;
+import com.x.calendar.assemble.control.service.Calendar_EventCommentQueryService;
+import com.x.calendar.core.entity.Calendar_EventComment;
+import org.quartz.JobExecutionContext;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 定期检查是否存在没有被任何event或者event_master引用的EventComment记录,如果有,则需要进行删除
+ * 
+ * @author O2LEE
+ *
+ */
+public class CheckEventComment extends AbstractJob {
+
+	private static Logger logger = LoggerFactory.getLogger(CheckEventComment.class);
+	protected Calendar_EventCommentQueryService calendar_EventCommentQueryService = new Calendar_EventCommentQueryService();
+
+	@Override
+	public void schedule(JobExecutionContext jobExecutionContext) throws Exception {
+		Date now = new Date();
+		List<String> ids = calendar_EventCommentQueryService.listNeedCheckCommnetIds( now, 500 );
+		Integer maxWhileTimes = 10;
+		while( ListTools.isNotEmpty( ids )){
+			if( --maxWhileTimes < 0 ){
+				break;
+			}
+			ids.forEach( commentId->{
+				try {
+					if( !check( commentId, now )){
+						removeEventComment( commentId );
+					}
+				} catch (Exception e) {
+					e.printStackTrace();
+				}
+			});
+			ids = calendar_EventCommentQueryService.listNeedCheckCommnetIds( now, 500 );
+		}
+		logger.info("The trigger for calendar alarm execute completed." + new Date());
+	}
+
+	/**
+	 * 根据commentId,删除指定的备注信息
+	 * @param commentId
+	 */
+	private void removeEventComment(String commentId ) throws Exception {
+		Boolean quote = false;
+		if( calendar_EventCommentQueryService.countEventBundle( commentId ) > 0 ){
+			quote = true;
+		}
+		if( calendar_EventCommentQueryService.countRepeatMasterBundle( commentId ) > 0 ){
+			quote = true;
+		}
+		if( !quote ){
+			//没有引用,直接
+			try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+				Calendar_EventComment entity = emc.find( commentId, Calendar_EventComment.class );
+				if( entity != null ){
+					emc.beginTransaction( Calendar_EventComment.class );
+					emc.remove( entity, CheckRemoveType.all );
+					emc.commit();
+				}
+			}
+		}
+	}
+
+	/**
+	 * 检查该ID是否有事件引用到
+	 * 
+	 * @param commentId
+	 * @return
+	 * @throws Exception
+	 */
+	private boolean check( String commentId, Date now ) throws Exception {
+		if( calendar_EventCommentQueryService.countEventBundle( commentId ) > 0 ){
+			return true;
+		}
+		if( calendar_EventCommentQueryService.countRepeatMasterBundle( commentId ) > 0 ){
+			return true;
+		}
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			Calendar_EventComment entity = emc.find( commentId, Calendar_EventComment.class );
+			if( entity != null ){
+				emc.beginTransaction( Calendar_EventComment.class );
+				entity.setCheckTime( new Date() );
+				emc.check( entity, CheckPersistType.all );
+				emc.commit();
+			}
+		}
+		return false;
+	}
+
+}

+ 274 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/service/CalendarService.java

@@ -0,0 +1,274 @@
+package com.x.calendar.assemble.control.service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.lang3.StringUtils;
+
+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.base.core.project.tools.ListTools;
+import com.x.calendar.assemble.control.Business;
+import com.x.calendar.core.entity.Calendar;
+import com.x.calendar.core.entity.Calendar_Event;
+import com.x.calendar.core.entity.Calendar_EventRepeatMaster;
+
+
+/**
+ * 日历账户信息服务类
+ * @author O2LEE
+ *
+ */
+public class CalendarService {
+
+	/**
+	 * 获取所有的日历账户信息
+	 * @return
+	 * @throws Exception
+	 */
+	public List<Calendar> listAll( EntityManagerContainer emc ) throws Exception {
+		Business business =  new Business( emc );
+		return business.calendarFactory().listAll();
+	}
+
+	/**
+	 * 根据ID删除指定的日历账户信息
+	 * @param id
+	 * @throws Exception
+	 */
+	public void destory( EntityManagerContainer emc, String id ) throws Exception {
+		Calendar calendar = null;
+		if( StringUtils.isEmpty( id ) ){
+			throw new Exception( "id is empty, system can not delete any object." );
+		}
+		calendar = emc.find( id, Calendar.class );
+		if ( null == calendar ) {
+			throw new Exception( "object is not exist {'id':'"+ id +"'}" );
+		}else{
+			List<String> ids = null;
+			Business business = new Business(emc);
+			emc.beginTransaction( Calendar.class );
+			emc.beginTransaction( Calendar_Event.class );
+			emc.beginTransaction( Calendar_EventRepeatMaster.class );
+			
+			//删除所有的日历记录信息Calendar_Event
+			List<Calendar_Event> eventList = null;
+			ids = business.calendar_EventFactory().listWithCalendarId(id);
+			if( ListTools.isNotEmpty( ids )) {
+				eventList = business.calendar_EventFactory().list(ids);
+				if( ListTools.isNotEmpty( eventList )) {
+					for( Calendar_Event event : eventList ) {
+						emc.remove( event, CheckRemoveType.all );
+					}
+				}
+			}
+			
+			//删除所有的重复主要依据信息Calendar_EventRepeatMaster
+			List<Calendar_EventRepeatMaster> repeatedMasterList = null;
+			ids = business.calendar_EventRepeatMasterFactory().listWithCalendarId(id);
+			if( ListTools.isNotEmpty( ids )) {
+				repeatedMasterList = business.calendar_EventRepeatMasterFactory().list(ids);
+				if( ListTools.isNotEmpty( repeatedMasterList )) {
+					for( Calendar_EventRepeatMaster repeatedMaster : repeatedMasterList ) {
+						emc.remove( repeatedMaster, CheckRemoveType.all );
+					}
+				}
+			}
+			
+			//删除日历信息
+			emc.remove( calendar, CheckRemoveType.all );
+			emc.commit();
+		}
+	}
+
+	/**
+	 * 创建日历账户信息
+	 * @param calendar
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar create( EntityManagerContainer emc, Calendar calendar ) throws Exception {
+		Calendar calendar_old = null;
+		calendar_old = emc.find( calendar.getId(), Calendar.class );
+		if( calendar_old != null ){
+			throw new Exception("calendar{'id':' "+ calendar.getId() +" '} exists, can not create new object");
+		}else{
+			emc.beginTransaction( Calendar.class );
+			emc.persist( calendar, CheckPersistType.all);
+			emc.commit();
+		}
+		return calendar;
+	}
+	
+	/**
+	 * 更新日历账户信息
+	 * @param calendar
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar update( EntityManagerContainer emc, Calendar calendar ) throws Exception {
+		if( calendar == null ){
+			throw new Exception("calendar is null, can not update object!");
+		}
+		Calendar calendar_old = null;
+		Business business = new Business(emc);
+		calendar_old = business.calendarFactory().get( calendar.getId() );
+		if( calendar_old != null ){
+			emc.beginTransaction( Calendar.class );
+			calendar_old.setName( calendar.getName() );
+			calendar_old.setColor( calendar.getColor() );
+			calendar_old.setCreateor( calendar.getCreateor() );
+			calendar_old.setManageablePersonList( calendar.getManageablePersonList() );
+			calendar_old.setPublishableGroupList( calendar.getPublishableGroupList() );
+			calendar_old.setPublishablePersonList( calendar.getPublishablePersonList() );
+			calendar_old.setPublishableUnitList( calendar.getPublishableUnitList() );
+			calendar_old.setViewableGroupList( calendar.getViewableGroupList() );
+			calendar_old.setViewablePersonList( calendar.getViewablePersonList() );
+			calendar_old.setViewableUnitList( calendar.getViewableUnitList() );
+			calendar_old.setTarget( calendar.getTarget() );
+			calendar_old.setDescription( calendar.getDescription() );
+			calendar_old.setIsPublic( calendar.getIsPublic() );
+			calendar_old.setStatus( calendar.getStatus() );
+			emc.check( calendar_old, CheckPersistType.all);
+			emc.commit();
+		}else{
+			throw new Exception("old object calendar{'id':' "+ calendar.getId() +" '} is not exists. ");
+		}
+		return calendar_old;
+	}
+
+	/**
+	 * 查询用户创建的日历
+	 * @param emc
+	 * @param personName
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listMyCalenders( EntityManagerContainer emc, String personName ) throws Exception {
+		Business business =  new Business( emc );
+		return business.calendarFactory().listMyCalender( personName );
+	}
+	
+	/**
+	 * 根据条件查询指定的日历信息ID列表
+	 * @param emc
+	 * @param name
+	 * @param type
+	 * @param source
+	 * @param createor
+	 * @param inFilterCalendarIds
+	 * @param personName
+	 * @param unitNames
+	 * @param groupNames
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listWithCondition( EntityManagerContainer emc,  String name, String type, String source, String createor,
+			 List<String> inFilterCalendarIds, String personName, List<String> unitNames, List<String> groupNames ) throws Exception {
+		Business business =  new Business( emc );
+		//如果用户没有自己可管理的日历,则创建一个新的日历
+		List<String> ids = business.calendarFactory().listMyCalender( personName );
+		
+		if( ListTools.isEmpty( ids ) ) {
+			//创建一个自己的默认日历
+			Calendar calendar = new Calendar();
+			calendar.setSource( "PERSON" );
+			calendar.setCreateor( personName );
+			calendar.setColor( "#1462be" );
+			calendar.setDescription( "我的默认日历" );
+			calendar.setId( Calendar.createId() );
+			calendar.setIsPublic( false );
+			calendar.setName( "我的日历" );
+			calendar.setSource("PERSON");
+			calendar.setType("PERSON");
+			calendar.setTarget( personName );
+			calendar.setManageablePersonList( new ArrayList<>() );
+			calendar.setPublishablePersonList( new ArrayList<>() );
+			calendar.setViewablePersonList( new ArrayList<>() );
+			
+			addStringToList( personName, calendar.getManageablePersonList() );
+			addStringToList( personName, calendar.getPublishablePersonList() );
+			addStringToList( personName, calendar.getViewablePersonList() );
+			
+			emc.beginTransaction( Calendar.class );
+			emc.persist( calendar, CheckPersistType.all );
+			emc.commit();
+		}
+		return business.calendarFactory().listWithCondition( name, type, source, createor, inFilterCalendarIds, personName, unitNames, groupNames );
+	}
+
+	/**
+	 * 将一个字符串添加到一个List里
+	 * @param distinguishedName
+	 * @param manageablePersonList
+	 */
+	private void addStringToList(String distinguishedName, List<String> manageablePersonList) {
+		if( manageablePersonList == null ) {
+			manageablePersonList = new ArrayList<>();
+		}
+		if( StringUtils.isNotEmpty( distinguishedName ) ) {
+			if( !manageablePersonList.contains( distinguishedName )) {
+				manageablePersonList.add( distinguishedName );
+			}
+		}
+	}
+	
+	public List<Calendar> list(EntityManagerContainer emc,  List<String> ids) throws Exception {
+		Business business =  new Business( emc );
+		return business.calendarFactory().list(ids);
+	}
+
+	public List<String> listPublicCalendar(EntityManagerContainer emc) throws Exception {
+		Business business =  new Business( emc );
+		return business.calendarFactory().listPublicCalendar();
+	}
+
+	/**
+	 * 关注一个日历
+	 * @param emc
+	 * @param distinguishedName
+	 * @param id
+	 * @return
+	 * @throws Exception 
+	 */
+	public Boolean follow(EntityManagerContainer emc, String followerName, String id) throws Exception {
+		Calendar calendar = emc.find( id, Calendar.class );
+		if( calendar != null ) {
+			emc.beginTransaction( Calendar.class );
+			calendar.addFollower(followerName);
+			emc.check( calendar, CheckPersistType.all );
+			emc.commit();
+			return true;
+		}
+		return false;
+	}
+	
+	/**
+	 * 取消关注一个日历
+	 * @param emc
+	 * @param distinguishedName
+	 * @param id
+	 * @return
+	 * @throws Exception 
+	 */
+	public Boolean followCancel(EntityManagerContainer emc, String followerName, String id) throws Exception {
+		List<String> followerNames = new ArrayList<>();
+		Calendar calendar = emc.find( id, Calendar.class );
+		if( calendar != null ) {
+			emc.beginTransaction( Calendar.class );
+			if( ListTools.isNotEmpty( calendar.getFollowers() )) {
+				for( String _followerName : calendar.getFollowers() ) {
+					if( !followerName.equals( _followerName )) {
+						followerNames.add( _followerName );
+					}
+				}
+			}
+			calendar.setFollowers( followerNames );
+			emc.check( calendar, CheckPersistType.all );
+			emc.commit();
+			return true;
+		}
+		return false;
+	}
+}

+ 270 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/service/CalendarServiceAdv.java

@@ -0,0 +1,270 @@
+package com.x.calendar.assemble.control.service;
+
+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.base.core.project.tools.ListTools;
+import com.x.calendar.assemble.control.Business;
+import com.x.calendar.core.entity.Calendar;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+
+/**
+ * 日程日历信息服务类
+ * @author O2LEE
+ *
+ */
+public class CalendarServiceAdv{
+
+	private CalendarService calendarInfoService = new CalendarService();
+	
+	/**
+	 * 根据用户获取用户可以访问到的所有日历日历信息
+	 * @return
+	 * @throws Exception
+	 */
+	public List<Calendar> listAll() throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			return calendarInfoService.listAll( emc );	
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
+	public List<Calendar> list(List<String> ids) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			return calendarInfoService.list(emc, ids);
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}	
+	
+	/**
+	 * 根据ID获取指定日历日历信息
+	 * @param id
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar get(String id) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			return emc.find(id, Calendar.class);
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
+	/**
+	 * 保存日历信息
+	 * @param calendar
+	 * @param effectivePerson 
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar save( Calendar calendar, EffectivePerson effectivePerson ) throws Exception {
+		Calendar calendar_old = null;
+		Business business = null;
+		
+		if( StringUtils.isEmpty( calendar.getCreateor() )) {
+			calendar.setCreateor( effectivePerson.getDistinguishedName() );
+		}
+		
+		//管理者应该都有可见权限
+		if( ListTools.isNotEmpty( calendar.getManageablePersonList() )) {
+			for( String managerName : calendar.getManageablePersonList() ) {
+				addStringToList( managerName, calendar.getViewablePersonList() );
+			}
+		}
+		
+		//对日历信息进行权限设置,至少自己创建的日历自己可以管理 ,可以发布,可以查看
+		addStringToList( calendar.getCreateor(), calendar.getManageablePersonList() );
+		addStringToList( calendar.getCreateor(), calendar.getPublishablePersonList() );
+		addStringToList( calendar.getCreateor(), calendar.getViewablePersonList() );
+		
+		if( "UNIT".equals( calendar.getType() )) {
+			if( ListTools.isEmpty(calendar.getViewableUnitList() )
+				&& ListTools.isEmpty(calendar.getViewableGroupList() )
+				&& ListTools.isEmpty(calendar.getViewablePersonList() )){
+				addStringToList( calendar.getTarget(), calendar.getViewableUnitList() );
+			}
+		}else {
+			addStringToList( calendar.getTarget(), calendar.getViewablePersonList() );
+		}		
+		
+		if( StringUtils.isEmpty( calendar.getColor() )) {
+			calendar.setColor( "#1462be" );
+		}
+		if( StringUtils.isEmpty( calendar.getType() )) {
+			calendar.setType("PERSON");
+		}else {
+			calendar.setType( calendar.getType().toUpperCase() );
+		}
+		if( StringUtils.isEmpty( calendar.getSource() )) {
+			calendar.setSource("PERSON");
+		}else {
+			calendar.setSource( calendar.getSource().toUpperCase() );
+		}
+		if( "OPEN".equalsIgnoreCase( calendar.getStatus() ) || StringUtils.isEmpty(  calendar.getStatus() )) {
+			calendar.setStatus( "OPEN" );
+		}else {
+			calendar.setStatus( "CLOSE" );
+		}
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			business = new Business(emc);
+			calendar_old = business.calendarFactory().get( calendar.getId() );
+			if( calendar_old != null ){
+				calendar.setId( calendar_old.getId() );
+				return calendarInfoService.update( emc, calendar );	
+			}else{
+				return calendarInfoService.create( emc, calendar );	
+			}
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
+	/**
+	 * 将一个字符串添加到一个List里
+	 * @param distinguishedName
+	 * @param manageablePersonList
+	 */
+	private void addStringToList(String distinguishedName, List<String> manageablePersonList) {
+		if( manageablePersonList == null ) {
+			manageablePersonList = new ArrayList<>();
+		}
+		if( StringUtils.isNotEmpty( distinguishedName ) ) {
+			if( !manageablePersonList.contains( distinguishedName )) {
+				manageablePersonList.add( distinguishedName );
+			}
+		}
+	}
+
+	/**
+	 * 根据条件查询指定的日历信息ID列表
+	 * @param name
+	 * @param type
+	 * @param source
+	 * @param createor
+	 * @param inFilterCalendarIds
+	 * @param personName
+	 * @param unitNames
+	 * @param groupNames
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listWithCondition( String name, String type, String source, String createor,
+			 List<String> inFilterCalendarIds, String personName, List<String> unitNames, List<String> groupNames ) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			 return calendarInfoService.listWithCondition(emc, name, type, source, createor, inFilterCalendarIds, 
+					 personName, unitNames, groupNames);
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+	
+	/**
+	 * 根据条件查询指定的日历信息ID列表(忽略权限)
+	 * @param name
+	 * @param type
+	 * @param source
+	 * @param createor
+	 * @param inFilterCalendarIds
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listWithCondition( String name, String type, String source, String createor,
+			 List<String> inFilterCalendarIds ) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			 return calendarInfoService.listWithCondition(emc, name, type, source, createor, inFilterCalendarIds, 
+					 null, null, null );
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
+	/**
+	 * 根据权限查询日历信息ID列表
+	 * @param personName
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listMyCalendarIds( String personName ) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			 return calendarInfoService.listMyCalenders(emc, personName);
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+	
+	/**
+	 * 根据权限查询日历信息ID列表
+	 * @param personName
+	 * @param unitNames
+	 * @param groupNames
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listWithCondition( String personName, List<String> unitNames, List<String> groupNames ) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			 return calendarInfoService.listWithCondition(emc, null, null, null, null, null, personName, unitNames, groupNames);
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
+	/**
+	 * 根据Id删除日历信息,要删除日历中所有的记录信息以及重复主体信息
+	 * @param id
+	 * @throws Exception 
+	 */
+	public void destory(String id) throws Exception {
+		if(StringUtils.isEmpty( id )) {
+			throw new Exception("id is empty!");
+		}
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			calendarInfoService.destory(emc, id);
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
+	public List<String> listPublicCalendar() throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			return calendarInfoService.listPublicCalendar(emc);
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
+	/**
+	 * 关注一个日历
+	 * @param effectivePerson 
+	 * @param id
+	 * @return
+	 * @throws Exception 
+	 */
+	public Boolean follow( EffectivePerson effectivePerson, String id ) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			return calendarInfoService.follow(emc, effectivePerson.getDistinguishedName(), id );
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+	
+	/**
+	 * 取消关注一个日历
+	 * @param effectivePerson 
+	 * @param id
+	 * @return
+	 * @throws Exception 
+	 */
+	public Boolean followCancel( EffectivePerson effectivePerson, String id ) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			return calendarInfoService.followCancel(emc, effectivePerson.getDistinguishedName(), id );
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+}

+ 92 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/service/Calendar_EventCommentQueryService.java

@@ -0,0 +1,92 @@
+package com.x.calendar.assemble.control.service;
+
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.calendar.core.entity.Calendar_EventComment;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 日程日历备注信息服务类
+ * @author O2LEE
+ *
+ */
+public class Calendar_EventCommentQueryService {
+	private Calendar_EventCommentService calendar_EventCommentService = new Calendar_EventCommentService();
+
+	public List<Calendar_EventComment> list(List<String> ids) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			return calendar_EventCommentService.list(emc, ids);
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
+	/**
+	 * 根据ID获取指定日历记录备注信息
+	 * @param id
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar_EventComment get(String id) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			return emc.find(id, Calendar_EventComment.class);
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
+	/**
+	 * 查询在事件信息中,commentId被引用的次数
+	 * @param commentId
+	 * @return
+	 * @throws Exception
+	 */
+	public Long countEventBundle( String commentId ) throws Exception {
+		if( StringUtils.isEmpty( commentId ) ) {
+			return 0L;
+		}
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			return calendar_EventCommentService.countEventBundle(emc, commentId);
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
+	/**
+	 * 查询在事件循环主体信息中,commentId被引用的次数
+	 * @param commentId
+	 * @return
+	 * @throws Exception
+	 */
+	public Long countRepeatMasterBundle( String commentId ) throws Exception {
+		if( StringUtils.isEmpty( commentId ) ) {
+			return 0L;
+		}
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			return calendar_EventCommentService.countRepeatMasterBundle(emc, commentId);
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
+	/**
+	 * 查询更新时间早于传入时间的前N条信息ID
+	 * @param now
+	 * @param maxCount
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listNeedCheckCommnetIds( Date now, Integer maxCount ) throws Exception {
+		if( now == null ) {
+			now = new Date();
+		}
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			return calendar_EventCommentService.listNeedCheckCommnetIds( emc, now, maxCount );
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+}

+ 66 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/service/Calendar_EventCommentService.java

@@ -0,0 +1,66 @@
+package com.x.calendar.assemble.control.service;
+
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.calendar.assemble.control.Business;
+import com.x.calendar.common.date.DateOperation;
+import com.x.calendar.core.entity.Calendar_EventComment;
+import org.apache.commons.lang3.StringUtils;
+
+import java.util.Date;
+import java.util.List;
+
+
+/**
+ * 日历记录信息服务类
+ * @author O2LEE
+ *
+ */
+public class Calendar_EventCommentService {
+	
+	private DateOperation dateOperation = new DateOperation();
+
+	/**
+	 * 获取指定的备注信息对象列表
+	 * @return
+	 * @throws Exception
+	 */
+	public List<Calendar_EventComment> list(EntityManagerContainer emc, List<String> ids ) throws Exception {
+		Business business =  new Business( emc );
+		return business.calendar_EventCommentFactory().list(ids);
+	}
+
+	public Long countEventBundle( EntityManagerContainer emc, String commentId ) throws Exception {
+		if( StringUtils.isEmpty( commentId ) ) {
+			return 0L;
+		}
+		Business business =  new Business( emc );
+		return business.calendar_EventCommentFactory().countEventBundle(commentId);
+	}
+
+	public Long countRepeatMasterBundle( EntityManagerContainer emc, String commentId ) throws Exception {
+		if( StringUtils.isEmpty( commentId ) ) {
+			return 0L;
+		}
+		Business business =  new Business( emc );
+		return business.calendar_EventCommentFactory().countRepeatMasterBundle(commentId);
+	}
+
+	/**
+	 * 查询检查时间早于now的maxCount条记录的ID列表
+	 * @param emc
+	 * @param now
+	 * @param maxCount
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listNeedCheckCommnetIds(EntityManagerContainer emc, Date now, Integer maxCount) throws Exception {
+		if( now == null ) {
+			now = new Date();
+		}
+		if( maxCount == null ) {
+			maxCount = 1000;
+		}
+		Business business =  new Business( emc );
+		return business.calendar_EventCommentFactory().listNeedCheckCommnetIds( now, maxCount );
+	}
+}

+ 230 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/service/Calendar_EventRepeatMasterService.java

@@ -0,0 +1,230 @@
+package com.x.calendar.assemble.control.service;
+
+import java.util.ArrayList;
+import java.util.Date;
+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.base.core.project.tools.ListTools;
+import com.x.calendar.assemble.control.Business;
+import com.x.calendar.common.date.DateOperation;
+import com.x.calendar.core.entity.Calendar_Event;
+import com.x.calendar.core.entity.Calendar_EventRepeatMaster;
+
+
+/**
+ * 日历重复信息主体记录信息服务类
+ *
+ */
+public class Calendar_EventRepeatMasterService {
+
+	/**
+	 * 根据ID彻底删除指定的日历重复信息主体记录信息
+	 * @param emc
+	 * @param repeatMasterId
+	 * @param excludeIds 排除EventID列表
+	 * @throws Exception
+	 */
+	public void destoryWithMasterId( EntityManagerContainer emc, String repeatMasterId, List<String> excludeIds ) throws Exception {
+		Calendar_EventRepeatMaster calendar_EventRepeatMaster = null;
+		if( StringUtils.isEmpty( repeatMasterId ) ){
+			throw new Exception( "repeatMasterId is empty, system can not delete any object." );
+		}
+		List<String> eventIds = null;
+		Business business =  new Business( emc );
+		Calendar_Event calendar_Event = null;
+		calendar_EventRepeatMaster = emc.find( repeatMasterId, Calendar_EventRepeatMaster.class );
+		eventIds = business.calendar_EventFactory().listWithRepeatMaster(repeatMasterId, null, null );
+		emc.beginTransaction( Calendar_Event.class );
+		emc.beginTransaction( Calendar_EventRepeatMaster.class );
+		if( ListTools.isNotEmpty( eventIds )) {
+			for( String id : eventIds ) {
+				if( !ListTools.contains( excludeIds, id ) ) {
+					calendar_Event = emc.find( id, Calendar_Event.class );
+					if( calendar_Event != null) {
+						emc.remove( calendar_Event, CheckRemoveType.all );
+					}
+				}
+			}
+		}
+		if( calendar_EventRepeatMaster != null  ) {			
+			emc.remove( calendar_EventRepeatMaster, CheckRemoveType.all );
+		}
+		emc.commit();
+	}
+
+	/**
+	 * 创建日历重复信息主体记录信息
+	 * @param emc
+	 * @param calendar_EventRepeatMaster
+	 * @param autoTransaction
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar_EventRepeatMaster create( EntityManagerContainer emc, 
+			Calendar_EventRepeatMaster calendar_EventRepeatMaster,
+			Boolean autoTransaction ) throws Exception {
+		if( autoTransaction == null ) {
+			autoTransaction = true;
+		}
+		Calendar_EventRepeatMaster calendar_EventRepeatMaster_old = null;
+		calendar_EventRepeatMaster_old = emc.find( calendar_EventRepeatMaster.getId(), Calendar_EventRepeatMaster.class );
+		if( calendar_EventRepeatMaster_old != null ){
+			throw new Exception("calendar_EventRepeatMaster{'id':' "+ calendar_EventRepeatMaster.getId() +" '} exists, can not create new object");
+		}else{
+			if(autoTransaction) {
+				emc.beginTransaction( Calendar_EventRepeatMaster.class );
+			}
+			if( StringUtils.isEmpty( calendar_EventRepeatMaster.getId() )) {
+				calendar_EventRepeatMaster.setId( Calendar_Event.createId() );
+			}
+			emc.persist( calendar_EventRepeatMaster, CheckPersistType.all);
+			if(autoTransaction) {
+				emc.commit();
+			}
+		}
+		return calendar_EventRepeatMaster;
+	}
+
+	/**
+	 * 更新日历重复信息主体记录信息
+	 * @param emc
+	 * @param calendar_EventRepeatMaster
+	 * @param autoTransaction
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar_EventRepeatMaster update( EntityManagerContainer emc, 
+			Calendar_EventRepeatMaster calendar_EventRepeatMaster, Boolean autoTransaction ) throws Exception {
+		if( autoTransaction == null ) {
+			autoTransaction = true;
+		}
+		if( calendar_EventRepeatMaster == null ){
+			throw new Exception("calendar_EventRepeatMaster is null, can not update object!");
+		}
+		Calendar_EventRepeatMaster calendar_EventRepeatMaster_old = null;
+		Business business = new Business(emc);
+		calendar_EventRepeatMaster_old = business.calendar_EventRepeatMasterFactory().get( calendar_EventRepeatMaster.getId() );
+		if( calendar_EventRepeatMaster_old != null ){
+			if(autoTransaction) {
+				emc.beginTransaction( Calendar_EventRepeatMaster.class );
+			}
+			calendar_EventRepeatMaster.copyTo(calendar_EventRepeatMaster_old, JpaObject.FieldsUnmodify);
+			emc.check( calendar_EventRepeatMaster_old, CheckPersistType.all);
+			if(autoTransaction) {
+				emc.commit();
+			}
+		}else{
+			throw new Exception("old object calendar_EventRepeatMaster{'id':' "+ calendar_EventRepeatMaster.getId() +" '} is not exists. ");
+		}
+		return calendar_EventRepeatMaster_old;
+	}
+
+	/**
+	 * 根据条件查询指定的日历信息ID列表
+	 * @param emc
+	 * @param title
+	 * @param type
+	 * @param source
+	 * @param createor
+	 * @param inFilterCalendarIds
+	 * @param personName
+	 * @param unitNames
+	 * @param groupNames
+	 * @param startTime
+	 * @param endTime
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listWithCondition( EntityManagerContainer emc,  String title, String type, String source, String createor,
+			 List<String> inFilterCalendarIds, String personName, List<String> unitNames, List<String> groupNames, Date startTime, Date endTime
+			 ) throws Exception {
+		Business business =  new Business( emc );
+		return business.calendar_EventRepeatMasterFactory().listWithCondition(title, type, source, createor, inFilterCalendarIds, personName, 
+				unitNames, groupNames, startTime, endTime);
+	}
+	
+
+	public List<Calendar_EventRepeatMaster> list(EntityManagerContainer emc,  List<String> ids) throws Exception {
+		Business business =  new Business( emc );
+		return business.calendar_EventRepeatMasterFactory().list(ids);
+	}
+
+	/**
+	 * 检查该repeatMaster下所有的记录是不是全都是已经删除了,如果没有有效的记录的话,就全部删除掉
+	 * @param emc
+	 * @param repeatMasterId
+	 * @throws Exception 
+	 */
+	public void checkRepeatMaster( EntityManagerContainer emc, String repeatMasterId ) throws Exception {
+		Business business =  new Business( emc );
+		long count = business.calendar_EventFactory().countWithRepeatMaster( repeatMasterId );
+		if( count == 0 ) {
+			//删除repeatMaster
+			Calendar_EventRepeatMaster calendar_EventRepeatMaster = emc.find( repeatMasterId, Calendar_EventRepeatMaster.class );
+			emc.beginTransaction( Calendar_EventRepeatMaster.class );
+			emc.remove( calendar_EventRepeatMaster, CheckRemoveType.all );
+			emc.commit(); 
+		}
+	}
+
+	/**
+	 * 根据条件和时间范围查询需要进行事件生成的重复主体ID列表,  时间根据已经生成过的日期来判断
+	 * @param emc
+	 * @param calendarIds
+	 * @param eventType
+	 * @param startTime
+	 * @param endTime
+	 * @param personName
+	 * @param unitNames
+	 * @param groupNames
+	 * @return
+	 * @throws Exception 
+	 */
+	public List<String> listNeedRepeatMaster( EntityManagerContainer emc, List<String> calendarIds, String eventType,
+			Date startTime, Date endTime, String personName, List<String> unitNames, List<String> groupNames) throws Exception {
+		Business business =  new Business( emc );
+		List<String> result = new ArrayList<>();
+		List<String> ids = null;
+		//两个时间之间的月份查出来,看看这些月份是否需要生成日历事件
+		List<String> needCreateMonths = new DateOperation().listMonthsBetweenDate(startTime, endTime);
+		if( ListTools.isNotEmpty( needCreateMonths ) ) {
+			for(String createMonth : needCreateMonths) {
+				ids = business.calendar_EventRepeatMasterFactory().listNeedRepeatMaster( calendarIds, eventType,
+						createMonth, personName, unitNames,  groupNames);
+				if( ListTools.isNotEmpty( ids )) {
+					for( String id : ids ) {
+						if( !result.contains( id )) {
+							result.add( id );
+						}
+					}
+				}
+			}
+		}		
+		return result;
+	}
+
+	/**
+	 * 根据条件和时间范围查询需要进行事件生成的重复主体ID列表,  时间根据已经生成过的日期来判断
+	 * @param emc
+	 * @param calendarIds
+	 * @param eventType
+	 * @param createMonth
+	 * @param personName
+	 * @param unitNames
+	 * @param groupNames
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listNeedRepeatMaster( EntityManagerContainer emc, List<String> calendarIds, String eventType,
+			String createMonth, String personName, List<String> unitNames, List<String> groupNames) throws Exception {
+		Business business =  new Business( emc );		
+		return business.calendar_EventRepeatMasterFactory().listNeedRepeatMaster( calendarIds, eventType,
+				createMonth, personName, unitNames,  groupNames);
+	}
+}

+ 137 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/service/Calendar_EventRepeatMasterServiceAdv.java

@@ -0,0 +1,137 @@
+package com.x.calendar.assemble.control.service;
+
+import java.util.Date;
+import java.util.List;
+
+import com.x.base.core.container.EntityManagerContainer;
+import com.x.base.core.container.factory.EntityManagerContainerFactory;
+import com.x.calendar.assemble.control.Business;
+import com.x.calendar.core.entity.Calendar_EventRepeatMaster;
+
+
+/**
+ * 日程日历信息服务类
+ * @author O2LEE
+ *
+ */
+public class Calendar_EventRepeatMasterServiceAdv{
+
+	private Calendar_EventRepeatMasterService calendar_EventRepeatMasterService = new Calendar_EventRepeatMasterService();
+
+	public List<Calendar_EventRepeatMaster> list(List<String> ids) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			return calendar_EventRepeatMasterService.list(emc, ids);
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}	
+	
+	/**
+	 * 根据ID获取指定日历记录信息
+	 * @param id
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar_EventRepeatMaster get(String id) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			return emc.find(id, Calendar_EventRepeatMaster.class);
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
+	/**
+	 * 保存日历记录信息
+	 * @param calendar_record
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar_EventRepeatMaster save( Calendar_EventRepeatMaster calendar_record ) throws Exception {
+		Calendar_EventRepeatMaster calendar_record_old = null;
+		Business business = null;
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			business = new Business(emc);
+			calendar_record_old = business.calendar_EventRepeatMasterFactory().get( calendar_record.getId() );
+			if( calendar_record_old != null ){
+				calendar_record.setId( calendar_record_old.getId() );
+				return calendar_EventRepeatMasterService.update( emc, calendar_record, true );	
+			}else{
+				return calendar_EventRepeatMasterService.create( emc, calendar_record, true );	
+			}
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
+	/**
+	 * 根据条件查询指定的日历记录信息ID列表
+	 * @param title
+	 * @param type
+	 * @param source
+	 * @param createor
+	 * @param inFilterCalendarIds
+	 * @param personName
+	 * @param unitNames
+	 * @param groupNames
+	 * @param startTime
+	 * @param endTime
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listWithCondition( String title, String type, String source, String createor, List<String> inFilterCalendarIds, 
+			String personName, List<String> unitNames, List<String> groupNames, Date startTime, Date endTime ) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			 return calendar_EventRepeatMasterService.listWithCondition(emc, title, type, source, createor, inFilterCalendarIds, personName, unitNames, 
+					 groupNames, startTime, endTime );
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+	
+	/**
+	 * 根据条件查询指定的日历记录信息ID列表
+	 * @param inFilterCalendarIds
+	 * @param personName
+	 * @param unitNames
+	 * @param groupNames
+	 * @param startTime
+	 * @param endTime
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listWithCondition( List<String> inFilterCalendarIds, 
+			String personName, List<String> unitNames, List<String> groupNames, Date startTime, Date endTime ) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			 return calendar_EventRepeatMasterService.listWithCondition(emc, null, null, null, null, inFilterCalendarIds, personName, unitNames, 
+					 groupNames, startTime, endTime );
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
+	/**
+	 * 根据ID彻底删除指定的日历记录信息
+	 * @param id
+	 * @throws Exception
+	 */
+	public void destoryWithMasterId(String id) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			 calendar_EventRepeatMasterService.destoryWithMasterId(emc, id, null );
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+
+	/**
+	 * 检查该repeatMaster下所有的记录是不是全都是已经删除了,如果没有有效的记录的话,就全部删除掉
+	 * @param repeatMasterId
+	 * @throws Exception
+	 */
+	public void checkRepeatMaster(String repeatMasterId) throws Exception {
+		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
+			calendar_EventRepeatMasterService.checkRepeatMaster( emc, repeatMasterId );
+		} catch ( Exception e ) {
+			throw e;
+		}
+	}
+}

+ 333 - 0
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/assemble/control/service/Calendar_EventService.java

@@ -0,0 +1,333 @@
+package com.x.calendar.assemble.control.service;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import com.x.base.core.project.tools.StringTools;
+import com.x.calendar.core.entity.Calendar_EventComment;
+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.base.core.project.tools.ListTools;
+import com.x.calendar.assemble.control.Business;
+import com.x.calendar.common.date.DateOperation;
+import com.x.calendar.core.entity.Calendar_Event;
+import com.x.calendar.core.entity.Calendar_EventRepeatMaster;
+
+
+/**
+ * 日历记录信息服务类
+ * @author O2LEE
+ *
+ */
+public class Calendar_EventService {
+	
+	private DateOperation dateOperation = new DateOperation();
+
+	/**
+	 * 根据ID彻底删除指定的日历记录信息
+	 * @param id
+	 * @throws Exception
+	 */
+	public void destory( EntityManagerContainer emc, String id ) throws Exception {
+		Calendar_Event calendar_Event = null;
+		if( StringUtils.isEmpty( id ) ){
+			throw new Exception( "id is empty, system can not delete any object." );
+		}
+		calendar_Event = emc.find( id, Calendar_Event.class );
+		if ( null == calendar_Event ) {
+			throw new Exception( "object is not exist {'id':'"+ id +"'}" );
+		}else{
+			emc.beginTransaction( Calendar_Event.class );
+			if(calendar_Event != null  ) {
+				emc.remove( calendar_Event, CheckRemoveType.all );
+			}
+			emc.commit();
+		}
+	}
+
+	public void destory(EntityManagerContainer emc, List<String> ids) throws Exception {
+		if( ListTools.isNotEmpty( ids )) {
+			Calendar_Event calendar_Event = null;
+			emc.beginTransaction( Calendar_Event.class );
+			for(String id : ids ) {
+				if( StringUtils.isNotEmpty( id ) ){
+					calendar_Event = emc.find( id, Calendar_Event.class );
+					if ( null != calendar_Event ) {
+						if(calendar_Event != null  ) {
+							emc.remove( calendar_Event, CheckRemoveType.all );
+						}
+					}
+				}
+			}
+			emc.commit();
+		}
+	}
+
+	/**
+	 * 创建日历记录信息
+	 * @param emc
+	 * @param calendar_record
+	 * @param autoTransaction
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar_Event create( EntityManagerContainer emc,  Calendar_Event calendar_record,
+			Boolean autoTransaction ) throws Exception {
+		if( autoTransaction == null ) {
+			autoTransaction = true;
+		}
+		Calendar_Event calendar_record_old = null;
+		calendar_record_old = emc.find( calendar_record.getId(), Calendar_Event.class );
+		if( calendar_record_old != null ){
+			throw new Exception("calendar_record{'id':' "+ calendar_record.getId() +" '} exists, can not create new object");
+		}else{
+			if( autoTransaction ) {
+				emc.beginTransaction( Calendar_Event.class );
+			}
+			emc.persist( calendar_record, CheckPersistType.all);	
+			if( autoTransaction ) {
+				emc.commit();
+			}
+		}
+		return calendar_record;
+	}
+	
+	/**
+	 * 更新日历记录信息
+	 * @param emc
+	 * @param calendar_record
+	 * @param autoTransaction  - 是否自动提交
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar_Event update( EntityManagerContainer emc, Calendar_Event calendar_record, Boolean autoTransaction ) throws Exception {
+		if( calendar_record == null ){
+			throw new Exception("calendar_record is null, can not update object!");
+		}
+		if( autoTransaction == null ) {
+			autoTransaction = true;
+		}
+		Calendar_Event calendar_record_old = null;
+		Business business = new Business(emc);
+		calendar_record_old = business.calendar_EventFactory().get( calendar_record.getId() );
+		if( calendar_record_old != null ){
+			if( autoTransaction ) {
+				emc.beginTransaction( Calendar_Event.class );
+			}			
+			calendar_record.copyTo(calendar_record_old, JpaObject.FieldsUnmodify);
+			emc.check( calendar_record_old, CheckPersistType.all);
+			if( autoTransaction ) {
+				emc.commit();
+			}
+		}else{
+			throw new Exception("old object calendar_record{'id':' "+ calendar_record.getId() +" '} is not exists. ");
+		}
+		return calendar_record_old;
+	}
+
+	/**
+	 * 根据条件查询指定的日历信息ID列表
+	 * @param emc
+	 * @param key
+	 * @param eventType
+	 * @param source
+	 * @param createPerson
+	 * @param calendarIds
+	 * @param personName
+	 * @param unitNames
+	 * @param groupNames
+	 * @param startTime
+	 * @param endTime
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listWithCondition( EntityManagerContainer emc,  String key, String eventType, String source, String createPerson,
+			 List<String> calendarIds, String personName, List<String> unitNames, List<String> groupNames, Date startTime, Date endTime
+			 ) throws Exception {
+		Business business =  new Business( emc );
+		return business.calendar_EventFactory().listWithCondition( key, eventType, source, createPerson, calendarIds, personName, 
+				unitNames, groupNames, startTime, endTime);
+	}
+	
+	/**
+	 * 根据重复主体以及日期落雷查询指定的日历记录信息ID列表
+	 * @param emc
+	 * @param repeatMasterId
+	 * @param startTime
+	 * @param endTime
+	 * @return
+	 * @throws Exception
+	 */
+	public List<String> listWithRepeatMaster( EntityManagerContainer emc,  String repeatMasterId, Date startTime, Date endTime ) throws Exception {
+		Business business =  new Business( emc );
+		return business.calendar_EventFactory().listWithRepeatMaster(repeatMasterId, startTime, endTime);
+	}
+
+	public List<Calendar_Event> list(EntityManagerContainer emc,  List<String> ids) throws Exception {
+		Business business =  new Business( emc );
+		return business.calendar_EventFactory().list(ids);
+	}
+
+	/**
+	 * 根据日期范围为指定的日期重复主体生成日历事件信息
+	 * @param emc
+	 * @param repeatMasterIds
+	 * @param startTime
+	 * @param endTime
+	 * @param needCreateMonths 
+	 * @return
+	 * @throws Exception 
+	 */
+	public List<String> createCalendarWithMaster( EntityManagerContainer emc, List<String> repeatMasterIds, Date startTime, Date endTime, List<String> needCreateMonths ) throws Exception {
+		List<String> event_ids = new ArrayList<>();
+		if( ListTools.isNotEmpty( repeatMasterIds )) {
+			Business business =  new Business( emc );
+			List<Calendar_Event> calendarEvents = null;
+			Calendar_EventRepeatMaster eventRepeatMaster = null;
+			for( String repeatMasterId : repeatMasterIds ) {
+				eventRepeatMaster = emc.find( repeatMasterId , Calendar_EventRepeatMaster.class );
+				if( eventRepeatMaster != null ) {
+					calendarEvents = eventRepeatMaster.getRecurringDatesInPeriod( startTime, endTime );
+				}
+				if( ListTools.isNotEmpty( calendarEvents )) {
+					for( Calendar_Event calendar_Event : calendarEvents ) {
+						//判断该事件是否已经存在,如果不存在,则进行数据添加
+						if ( !business.calendar_EventFactory().eventExists( calendar_Event ) ) {							
+							calendar_Event.setCreatePerson( eventRepeatMaster.getCreatePerson() );
+							calendar_Event.addParticipants( eventRepeatMaster.getCreatePerson() );
+							calendar_Event.setRepeatMasterId(eventRepeatMaster.getId());							
+		
+							//计算提醒时间,以开始时间为基准
+							if( calendar_Event.getAlarm() ) {
+								String[] alarm_config = calendar_Event.getValarmTime_config().trim().split(","); 
+								if( alarm_config.length == 4 ) {
+									int day, hour, min, sec = 0;
+									Date alarmTime = null;
+									try {
+										day = Integer.parseInt( alarm_config[0].trim() );
+										hour = Integer.parseInt( alarm_config[01].trim() );
+										min = Integer.parseInt( alarm_config[2].trim() );
+										sec = Integer.parseInt( alarm_config[3].trim() );
+										alarmTime = dateOperation.caculateNewDate( calendar_Event.getStartTime(), day, hour, min, sec );
+										calendar_Event.setAlarmTime(alarmTime);
+									}catch( Exception e ) {
+										calendar_Event.setAlarm( false );
+										calendar_Event.setValarmTime_config( "0,0,0,0" );
+									}				 
+								}else {
+									calendar_Event.setAlarm( false );
+									calendar_Event.setValarmTime_config( "0,0,0,0" );
+								}
+							}							
+							event_ids.add( calendar_Event.getId() );
+							
+							emc.beginTransaction( Calendar_Event.class );
+							emc.persist( calendar_Event, CheckPersistType.all  );
+							emc.commit();
+						}
+					}
+					
+					if( ListTools.isNotEmpty( needCreateMonths )) {
+						for( String date : needCreateMonths ) {
+							eventRepeatMaster.addCreatedMonth( date );	
+						}
+					}
+					
+					emc.beginTransaction( Calendar_EventRepeatMaster.class );
+					emc.check( eventRepeatMaster, CheckPersistType.all );
+					emc.commit();
+				}
+			}
+		}
+		return event_ids;
+	}
+	
+	/**
+	 * 查询需要提醒的日程事件列表
+	 * @param date
+	 * @return
+	 * @throws Exception 
+	 */
+	public List<String> listNeedAlarmEventIds(EntityManagerContainer emc, Date date) throws Exception {
+		Business business =  new Business( emc );
+		return business.calendar_EventFactory().listNeedAlarmEventIds( date );
+	}
+
+	public List<String> destoryWithBundle(EntityManagerContainer emc, String bundle) throws Exception {
+		if( StringUtils.isEmpty( bundle ) ) {
+			throw new Exception("bundle is null!");
+		}
+		Business business =  new Business( emc );
+		List<String> ids = business.calendar_EventFactory().listWithBundle( bundle );
+		if( ListTools.isEmpty( ids )) {
+			return new ArrayList<>();
+		}else {
+			List<Calendar_Event> events = business.calendar_EventFactory().list(ids);
+			for( Calendar_Event event : events ) {
+				emc.beginTransaction( Calendar_Event.class );
+				emc.remove( event, CheckRemoveType.all );
+				emc.commit();
+			}
+			return ids;
+		}
+	}
+
+	/**
+	 * 创建一个新的Calendar_EventComment,不检查是否已经存在
+	 * @param emc
+	 * @param calendar_event
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar_EventComment createNewEventComment( EntityManagerContainer emc, Calendar_Event calendar_event ) throws Exception {
+		Calendar_EventComment calendar_EventComment = null;
+		//先判断commnet的大小,如果过长,则需要存储到Calendar_EventComment表里
+		if( StringUtils.isNotEmpty( calendar_event.getComment() ) && StringTools.utf8Length( calendar_event.getComment() ) > 255 ){
+			emc.beginTransaction( Calendar_EventComment.class );
+			//需要新建一个Calendar_EventComment
+			calendar_EventComment = new Calendar_EventComment();
+			calendar_EventComment.setId( Calendar_EventComment.createId() );
+			calendar_EventComment.setLobValue( calendar_event.getComment() );
+			emc.persist( calendar_EventComment, CheckPersistType.all );
+			emc.commit();
+		}
+		return calendar_EventComment;
+	}
+
+	/**
+	 * 创建或者检查Calendar_EventComment,如果已经存在,则进行更新
+	 * @param emc
+	 * @param calendar_event
+	 * @return
+	 * @throws Exception
+	 */
+	public Calendar_EventComment createOrUpdateEventComment( EntityManagerContainer emc, Calendar_Event calendar_event ) throws Exception {
+		Calendar_EventComment calendar_EventComment = null;
+		//先判断commnet的大小,如果过长,则需要存储到Calendar_EventComment表里
+		if( StringUtils.isNotEmpty( calendar_event.getComment() ) && StringTools.utf8Length( calendar_event.getComment() ) > 255 ){
+			emc.beginTransaction( Calendar_EventComment.class );
+			if( StringUtils.isNotEmpty( calendar_event.getCommentId() )){
+				//根据ID查询出Calendar_EventComment
+				calendar_EventComment = emc.find( calendar_event.getCommentId(), Calendar_EventComment.class );
+			}
+			if( calendar_EventComment == null ){
+				//需要新建一个Calendar_EventComment
+				calendar_EventComment = new Calendar_EventComment();
+				calendar_EventComment.setId( Calendar_EventComment.createId() );
+				calendar_EventComment.setLobValue( calendar_event.getComment() );
+				emc.persist( calendar_EventComment, CheckPersistType.all );
+			}else{
+				//需要更新Calendar_EventComment
+				calendar_EventComment.setLobValue( calendar_event.getComment() );
+				emc.check( calendar_EventComment, CheckPersistType.all );
+			}
+			emc.commit();
+		}
+		return calendar_EventComment;
+	}
+}

Некоторые файлы не были показаны из-за большого количества измененных файлов