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

+ 3 - 1
o2server/configSample/person.json

@@ -10,6 +10,7 @@
   "passwordRegexHint": "6位以上,包含数字和字母.",
   "passwordRegexHint": "6位以上,包含数字和字母.",
   "register": "disable",
   "register": "disable",
   "superPermission": true,
   "superPermission": true,
+  "personUnitOrderByAsc": true,
   "###captchaLogin": "是否启用验证码登录,默认值:true###",
   "###captchaLogin": "是否启用验证码登录,默认值:true###",
   "###codeLogin": "是否启用验证码登录,默认值:true###",
   "###codeLogin": "是否启用验证码登录,默认值:true###",
   "###bindLogin": "是否启用扫描二维码登录,默认值:false###",
   "###bindLogin": "是否启用扫描二维码登录,默认值:false###",
@@ -32,5 +33,6 @@
   },
   },
   "###failureInterval": "登录限制时间(分钟)###",
   "###failureInterval": "登录限制时间(分钟)###",
   "###failureCount": "尝试登录次数###",
   "###failureCount": "尝试登录次数###",
-  "###tokenExpiredMinutes": "token时长,分钟###"
+  "###tokenExpiredMinutes": "token时长,分钟###",
+  "###personUnitOrderByAsc": "人员组织排序是否为升序,true为升序(默认),false为降序###"
 }
 }

+ 0 - 3983
o2server/console_aix.sh

@@ -1,3983 +0,0 @@
-{
-  "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": "布尔值."
-            }
-          ]
-        }
-      ]
-    }
-  ]
-}

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

@@ -1,32 +0,0 @@
-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;
-	}
-
-}

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

@@ -1,32 +0,0 @@
-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();
-		}
-	}
-}

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

@@ -1,66 +0,0 @@
-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;
-	}
-}

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

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

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

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

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

@@ -1,5 +0,0 @@
-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
-}

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

@@ -1,13 +0,0 @@
-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);
-	}
-}

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

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

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

@@ -1,210 +0,0 @@
-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;
-	}
-}

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

@@ -1,157 +0,0 @@
-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();
-	}	
-}

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

@@ -1,104 +0,0 @@
-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();
-	}
-}

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

@@ -1,244 +0,0 @@
-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();
-	}
-}

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

@@ -1,184 +0,0 @@
-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();
-	}
-}

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

@@ -1,114 +0,0 @@
-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;
-	}
-	
-}

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

@@ -1,27 +0,0 @@
-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();
-	}
-	
-}

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

@@ -1,25 +0,0 @@
-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;
-	}
-
-}

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

@@ -1,17 +0,0 @@
-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 {
-
-}

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

@@ -1,19 +0,0 @@
-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 {
-
-}

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

@@ -1,15 +0,0 @@
-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 {
-
-}

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

@@ -1,15 +0,0 @@
-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 {
-
-}

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

@@ -1,67 +0,0 @@
-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  {
-	
-	}
-
-}

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

@@ -1,80 +0,0 @@
-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  {
-	}
-
-}

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

@@ -1,56 +0,0 @@
-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  {
-	}
-
-}

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

@@ -1,115 +0,0 @@
-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;
-		}		
-	}
-
-}

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

@@ -1,57 +0,0 @@
-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  {
-	}
-
-}

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

@@ -1,36 +0,0 @@
-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  {
-	}
-
-}

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

@@ -1,130 +0,0 @@
-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;
-		}		
-	}
-}

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

@@ -1,206 +0,0 @@
-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;
-		}
-		
-	}
-}

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

@@ -1,190 +0,0 @@
-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;
-		}
-	}
-}

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

@@ -1,143 +0,0 @@
-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 );
-		}
-	}
-}

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

@@ -1,12 +0,0 @@
-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();
-
-}

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

@@ -1,281 +0,0 @@
-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));
-	}
-}

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

@@ -1,12 +0,0 @@
-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为空,无法进行查询操作.");
-	}
-}

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

@@ -1,16 +0,0 @@
-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 );
-	}
-}

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

@@ -1,12 +0,0 @@
-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为空,无法进行查询或者保存操作.");
-	}
-}

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

@@ -1,12 +0,0 @@
-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 );
-	}
-}

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

@@ -1,12 +0,0 @@
-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+"'为空,无法进行保存操作.");
-	}
-}

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

@@ -1,12 +0,0 @@
-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+"'不合法,需要为人员标识或者组织标识.");
-	}
-}

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

@@ -1,154 +0,0 @@
-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 );
-		}
-	}
-}

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

@@ -1,157 +0,0 @@
-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 {
-	}
-}

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

@@ -1,115 +0,0 @@
-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  {
-	
-	}
-
-}

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

@@ -1,116 +0,0 @@
-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  {
-	
-	}
-
-}

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

@@ -1,124 +0,0 @@
-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;
-		}		
-	}
-}

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

@@ -1,67 +0,0 @@
-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  {
-	}
-
-}

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

@@ -1,342 +0,0 @@
-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);
-	}
-}

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

@@ -1,307 +0,0 @@
-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 {
-
-	}
-
-}

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

@@ -1,221 +0,0 @@
-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);
-	}
-}

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

@@ -1,197 +0,0 @@
-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 {
-	}
-}

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

@@ -1,179 +0,0 @@
-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 );
-		}
-	}
-}

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

@@ -1,198 +0,0 @@
-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 {
-	}
-}

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

@@ -1,197 +0,0 @@
-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;
-	}
-}

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

@@ -1,318 +0,0 @@
-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));
-	}
-
-}

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

@@ -1,50 +0,0 @@
-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));
-	}
-
-}

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

@@ -1,12 +0,0 @@
-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 );
-	}
-}

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

@@ -1,12 +0,0 @@
-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+"'为空,无法进行保存操作.");
-	}
-}

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

@@ -1,16 +0,0 @@
-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 );
-	}
-}

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

@@ -1,12 +0,0 @@
-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);
-	}
-}

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

@@ -1,12 +0,0 @@
-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 );
-	}
-}

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

@@ -1,16 +0,0 @@
-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 );
-	}
-}

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

@@ -1,12 +0,0 @@
-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 +"]属性为空,数据操作异常。");
-	}
-}

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

@@ -1,12 +0,0 @@
-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);
-	}
-}

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

@@ -1,12 +0,0 @@
-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 );
-	}
-}

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

@@ -1,16 +0,0 @@
-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 );
-	}
-}

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

@@ -1,12 +0,0 @@
-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 );
-	}
-}

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

@@ -1,12 +0,0 @@
-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("任务事件不允许进行重复,请不要进行重复规则设置.");
-	}
-}

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

@@ -1,12 +0,0 @@
-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);
-	}
-}

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

@@ -1,72 +0,0 @@
-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);
-	}
-
-}

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

@@ -1,71 +0,0 @@
-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);
-	}
-
-}

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

@@ -1,34 +0,0 @@
-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  {
-	}
-
-}

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

@@ -1,69 +0,0 @@
-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.base.core.project.tools.ListTools;
-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( ListTools.isNotEmpty(wraps) ) {
-					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);
-	}
-}

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

@@ -1,104 +0,0 @@
-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 );
-		}
-	}
-}

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

@@ -1,12 +0,0 @@
-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();
-
-}

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

@@ -1,158 +0,0 @@
-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));
-	}
-
-}

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

@@ -1,12 +0,0 @@
-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为空,无法进行查询或者保存操作.");
-	}
-}

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

@@ -1,12 +0,0 @@
-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为空,无法进行查询操作.");
-	}
-}

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

@@ -1,12 +0,0 @@
-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 );
-	}
-}

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

@@ -1,12 +0,0 @@
-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为空,无法进行查询或者保存操作.");
-	}
-}

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

@@ -1,12 +0,0 @@
-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 );
-	}
-}

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

@@ -1,30 +0,0 @@
-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 {
-
-	}
-
-}

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

@@ -1,12 +0,0 @@
-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();
-
-}

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

@@ -1,45 +0,0 @@
-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));
-	}
-}

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

@@ -1,76 +0,0 @@
-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;
-	}
-
-}

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

@@ -1,103 +0,0 @@
-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;
-	}
-
-}

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

@@ -1,290 +0,0 @@
-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() );
-
-			queryForAddNewPersonalDefaultCalendar(emc, personName,calendar );
-
-		}
-		return business.calendarFactory().listWithCondition( name, type, source, createor, inFilterCalendarIds, personName, unitNames, groupNames );
-	}
-
-	/**
-	 * 同步方法,避免前端的连续调用导致多条个人日历信息
-	 * @param emc
-	 * @param personName
-	 * @param calendar
-	 * @throws Exception
-	 */
-	private synchronized void queryForAddNewPersonalDefaultCalendar(EntityManagerContainer emc, String personName, Calendar calendar) throws Exception {
-		Business business =  new Business( emc );
-		List<String> ids = business.calendarFactory().listMyCalender( personName );
-		if( ListTools.isEmpty( ids )){
-			emc.beginTransaction( Calendar.class );
-			emc.persist( calendar, CheckPersistType.all );
-			emc.commit();
-		}
-	}
-
-	/**
-	 * 将一个字符串添加到一个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;
-	}
-}

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

@@ -1,270 +0,0 @@
-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;
-		}
-	}
-}

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

@@ -1,92 +0,0 @@
-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;
-		}
-	}
-}

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

@@ -1,66 +0,0 @@
-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 );
-	}
-}

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

@@ -1,230 +0,0 @@
-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);
-	}
-}

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

@@ -1,137 +0,0 @@
-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;
-		}
-	}
-}

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

@@ -1,333 +0,0 @@
-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;
-	}
-}

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

@@ -1,950 +0,0 @@
-package com.x.calendar.assemble.control.service;
-
-import java.io.ByteArrayOutputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-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.container.factory.EntityManagerContainerFactory;
-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.http.EffectivePerson;
-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;
-
-import net.fortuna.ical4j.data.CalendarOutputter;
-import net.fortuna.ical4j.model.Calendar;
-import net.fortuna.ical4j.model.DateTime;
-import net.fortuna.ical4j.model.Dur;
-import net.fortuna.ical4j.model.Recur;
-import net.fortuna.ical4j.model.TimeZone;
-import net.fortuna.ical4j.model.TimeZoneRegistry;
-import net.fortuna.ical4j.model.TimeZoneRegistryFactory;
-import net.fortuna.ical4j.model.component.VAlarm;
-import net.fortuna.ical4j.model.component.VEvent;
-import net.fortuna.ical4j.model.component.VTimeZone;
-import net.fortuna.ical4j.model.parameter.Cn;
-import net.fortuna.ical4j.model.parameter.Role;
-import net.fortuna.ical4j.model.property.Action;
-import net.fortuna.ical4j.model.property.Attendee;
-import net.fortuna.ical4j.model.property.CalScale;
-import net.fortuna.ical4j.model.property.Comment;
-import net.fortuna.ical4j.model.property.Description;
-import net.fortuna.ical4j.model.property.Location;
-import net.fortuna.ical4j.model.property.ProdId;
-import net.fortuna.ical4j.model.property.RRule;
-import net.fortuna.ical4j.model.property.Summary;
-import net.fortuna.ical4j.model.property.Uid;
-import net.fortuna.ical4j.model.property.Version;
-import net.fortuna.ical4j.validate.ValidationException;
-
-/**
- * 日程日历信息服务类
- * @author O2LEE
- *
- */
-public class Calendar_EventServiceAdv{
-
-	private DateOperation dateOperation = new DateOperation();
-	private Calendar_EventService calendar_EventService = new Calendar_EventService();
-	private Calendar_EventRepeatMasterService calendar_EventRepeatMasterService = new Calendar_EventRepeatMasterService();
-	
-	public List<Calendar_Event> list(List<String> ids) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return calendar_EventService.list(emc, ids);
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}	
-	
-	/**
-	 * 根据ID获取指定日历记录信息
-	 * @param id
-	 * @return
-	 * @throws Exception
-	 */
-	public Calendar_Event get(String id) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return emc.find(id, Calendar_Event.class);
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 保存日历记录信息
-	 * 2019-11-11 添加逻辑,适应超长的备注信息,如果备注信息超长,则将信息存储到Comment表中,并且在event和eventmaster里存储引用的ID
-	 * @param calendar_event
-	 * @param effectivePerson 
-	 * @return
-	 * @throws Exception
-	 */
-	public Calendar_Event create( Calendar_Event calendar_event, EffectivePerson effectivePerson ) throws Exception {
-
-		if( StringUtils.isEmpty( calendar_event.getId())){
-			calendar_event.setId( Calendar_Event.createId() );
-		}
-		
-		//对日历信息进行权限设置,至少自己创建的日历自己可以管理 ,可以发布,可以查看
-		addStringToList( effectivePerson.getDistinguishedName(), calendar_event.getParticipants() );
-		addStringToList( effectivePerson.getDistinguishedName(), calendar_event.getManageablePersonList() );
-		addStringToList( effectivePerson.getDistinguishedName(), calendar_event.getViewablePersonList() );
-		
-		if( StringUtils.isEmpty( calendar_event.getCreatePerson() )) {
-			calendar_event.setCreatePerson( effectivePerson.getDistinguishedName() );
-		}
-		if( StringUtils.isEmpty( calendar_event.getUpdatePerson() )) {
-			calendar_event.setUpdatePerson( effectivePerson.getDistinguishedName() );
-		}
-
-		Calendar_EventComment calendar_EventComment = null;
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			calendar_EventComment = calendar_EventService.createNewEventComment( emc, calendar_event );
-
-			//修改Comment信息
-			if( calendar_EventComment != null ){
-				calendar_event.setComment( "{#CLOB#}" );
-				calendar_event.setCommentId( calendar_EventComment.getId() );
-			}else{
-				calendar_event.setCommentId( null );
-			}
-
-			//如果是复重的日程,保存为重复信息主体,否则,保存为普通日程信息
-			if( StringUtils.isNotEmpty( calendar_event.getRecurrenceRule()) ) {
-				Calendar_EventRepeatMaster calendar_EventRepeatMaster = composeEventRepeatMasterWithEvent( calendar_event );
-				calendar_event.setRepeatMasterId( calendar_EventRepeatMaster.getId() );
-				emc.beginTransaction( Calendar_EventRepeatMaster.class );
-				calendar_EventRepeatMasterService.create(emc, calendar_EventRepeatMaster, false );
-			}
-			
-			if( StringUtils.isEmpty( calendar_event.getId() )) {
-				calendar_event.setId( Calendar_Event.createId() );
-			}
-			emc.beginTransaction( Calendar_Event.class );
-			//保存日程信息
-			calendar_event = calendar_EventService.create( emc, calendar_event, false );
-			emc.commit();
-		} catch ( Exception e ) {
-			throw e;
-		}
-		return calendar_event;
-	}
-
-	/**
-	 * 保存日历记录信息
-	 * @param calendar_event
-	 * @return
-	 * @throws Exception
-	 */
-	public Calendar_Event createByCipher( Calendar_Event calendar_event ) throws Exception {
-
-		if( StringUtils.isEmpty( calendar_event.getId())){
-			calendar_event.setId( Calendar_Event.createId() );
-		}
-		String personName = calendar_event.getCreatePerson();
-		//对日历信息进行权限设置,至少自己创建的日历自己可以管理 ,可以发布,可以查看
-		addStringToList( personName, calendar_event.getParticipants() );
-		addStringToList( personName, calendar_event.getManageablePersonList() );
-		addStringToList( personName, calendar_event.getViewablePersonList() );
-		
-		if( StringUtils.isEmpty( calendar_event.getCreatePerson() )) {
-			calendar_event.setCreatePerson( personName );
-		}
-		if( StringUtils.isEmpty( calendar_event.getUpdatePerson() )) {
-			calendar_event.setUpdatePerson( personName );
-		}
-		
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {			
-			if( StringUtils.isEmpty( calendar_event.getId() )) {
-				calendar_event.setId( Calendar_Event.createId() );
-			}
-			Calendar_EventComment calendar_EventComment = calendar_EventService.createNewEventComment( emc, calendar_event );
-			//修改Comment信息
-			if( calendar_EventComment != null ){
-				calendar_event.setComment( "{#CLOB#}" );
-				calendar_event.setCommentId( calendar_EventComment.getId() );
-			}else{
-				calendar_event.setCommentId( null );
-			}
-			emc.beginTransaction( Calendar_Event.class );
-			//保存日程信息
-			calendar_event = calendar_EventService.create( emc, calendar_event, false );
-			emc.commit();
-		} catch ( Exception e ) {
-			throw e;
-		}
-		return calendar_event;
-	}
-	
-	/**
-	 *  更新所有重复日程事件(一定是重复日程)
-	 *  
-	 * 1、更新当前日程事件对应的重复主体信息 RepeatMaster信息
-	 *       删除该事件重复主体信息中所有的已经生成的月份信息
-	 * 2、删除该RepeatMaster已经生成的所有日程事件
-	 * 
-	 * @param repeatMasterId
-	 * @param calendar_event
-	 * @param effectivePerson
-	 * @return
-	 * @throws Exception
-	 */
-	public Integer updateWithMaster( String repeatMasterId, Calendar_Event calendar_event, EffectivePerson effectivePerson ) throws Exception {		
-		
-		if( StringUtils.isEmpty( repeatMasterId )) {
-			throw new Exception("calendar repeat master id is empty, calendar can not save!" );
-		}
-		
-		if( calendar_event == null ) {
-			throw new Exception("calendar event is null, calendar can not save!" );
-		}
-		
-		Integer count = 0;
-		Business business = null;
-		Calendar_EventRepeatMaster calendar_EventRepeatMaster = null;
-		List<String> eventIds = null;
-		List<Calendar_Event> calendarEvents = null;
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			
-			business = new Business(emc);
-			//1、更新当前日程事件对应的重复主体信息 RepeatMaster信息
-			calendar_EventRepeatMaster = emc.find( repeatMasterId, Calendar_EventRepeatMaster.class );
-			if( calendar_EventRepeatMaster == null ) {
-				throw new Exception("calendar repeat master not exists, calendar can not save! MasterID:" + repeatMasterId );
-			}
-			
-			calendar_EventRepeatMaster = copyEventPropertyToMaster( calendar_event, calendar_EventRepeatMaster );
-			
-			//		对日历事件重复信息主体进行权限设置,至少自己创建的日历自己可以管理 ,可以发布,可以查看
-			addStringToList( effectivePerson.getDistinguishedName(), calendar_EventRepeatMaster.getParticipants() );
-			addStringToList( effectivePerson.getDistinguishedName(), calendar_EventRepeatMaster.getManageablePersonList() );
-			addStringToList( effectivePerson.getDistinguishedName(), calendar_EventRepeatMaster.getViewablePersonList() );
-			
-			if( StringUtils.isEmpty( calendar_EventRepeatMaster.getCreatePerson() )) {
-				calendar_EventRepeatMaster.setCreatePerson( effectivePerson.getDistinguishedName() );
-			}
-			if( StringUtils.isEmpty( calendar_EventRepeatMaster.getUpdatePerson() )) {
-				calendar_EventRepeatMaster.setUpdatePerson( effectivePerson.getDistinguishedName() );
-			}
-			calendar_EventRepeatMaster.setCreatedMonthList( new ArrayList<>());
-
-			//判断事件的备注信息是否超长,如果已经存在则需要更新一下
-			Calendar_EventComment calendar_EventComment = calendar_EventService.createOrUpdateEventComment( emc, calendar_event );
-			if( calendar_EventComment != null ){
-				calendar_EventRepeatMaster.setComment( "{#CLOB#}" );
-				calendar_EventRepeatMaster.setCommentId( calendar_EventComment.getId() );
-			}else{
-				calendar_EventRepeatMaster.setCommentId( null );
-			}
-
-			emc.beginTransaction( Calendar_EventRepeatMaster.class );
-			emc.check( calendar_EventRepeatMaster, CheckPersistType.all );
-			
-			//2、删除该RepeatMaster已经生成的所有日程事件,等待重新生成
-			eventIds = business.calendar_EventFactory().listWithRepeatMaster(repeatMasterId, null, null );
-			if( ListTools.isNotEmpty( eventIds )) {
-				count = eventIds.size();
-				calendarEvents = business.calendar_EventFactory().list( eventIds );
-			}
-			if( ListTools.isNotEmpty( calendarEvents )) {
-				emc.beginTransaction( Calendar_Event.class );	
-				for( Calendar_Event calendar_Event : calendarEvents ) {
-					emc.remove( calendar_Event, CheckRemoveType.all );
-				}
-			}
-			emc.commit();
-		} catch ( Exception e ) {
-			throw e;
-		}
-		return count;
-	}
-	
-	
-
-	/**
-	 *  更新重复日程事件中某一事件开始后续所有的日程事件信息(一定是重复日程)
-	 * 
-	 * 1、删除当前事件以及该重复事件主体信息已经生成的在该ID事件后续所有已经生成的日程事件信息
-	 * 2、删除该事件重复主体信息中相应的已经生成的月份信息(已经删除所有指定月份以及以后所有的月份)
-	 * 3、更新日程事件重复信息主体,将截止日期改为指定ID所在的日期的前一天的23:59:59
-	 * 4、新增一个新的日程重复主体,从指定ID日程所在的日期开始,信息及重复规则更新为最新的信息
-	 * 
-	 * @param repeatMasterId
-	 * @param calendar_event
-	 * @param effectivePerson
-	 * @return
-	 * @throws Exception
-	 */
-	public Integer updateAfterEventId( String repeatMasterId, Calendar_Event calendar_event, EffectivePerson effectivePerson ) throws Exception {		
-		
-		if( StringUtils.isEmpty( repeatMasterId )) {
-			throw new Exception("calendar repeat master id is empty, calendar can not save!" );
-		}
-		if( calendar_event == null ) {
-			throw new Exception("calendar event is null, calendar can not save!" );
-		}
-		
-		Integer count = 0;
-		Business business = null;
-		String eventYearAndMonth = null;
-		Date eventMonth = null;
-		Date createdMonth = null;
-		Calendar_EventRepeatMaster calendar_EventRepeatMaster = null;
-		Calendar_EventRepeatMaster calendar_EventRepeatMaster_new = null;
-		List<String> eventIds = null;
-		List<String> createdMonthList = new ArrayList<>();
-		List<Calendar_Event> calendarEvents = null;
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			
-			business = new Business(emc);
-			
-			//-----------------------------------------------------------------------------------------------------------------//
-			//1、删除当前事件以及该重复事件主体信息已经生成的该ID事件后续时间内所有已经生成的日程事件信息
-			eventIds = business.calendar_EventFactory().listWithRepeatMaster( repeatMasterId, calendar_event.getStartTime(), null );
-			if( ListTools.isNotEmpty( eventIds )) {
-				count = eventIds.size();
-				calendarEvents = business.calendar_EventFactory().list( eventIds );
-				if( ListTools.isNotEmpty( calendarEvents )) {
-					emc.beginTransaction( Calendar_Event.class );	
-					for( Calendar_Event calendar_Event : calendarEvents ) {
-						emc.remove( calendar_Event, CheckRemoveType.all );
-					}
-				}
-			}
-			
-			//-----------------------------------------------------------------------------------------------------------------//
-			//2、删除该事件重复主体信息中相应的已经生成的月份信息(已经删除所有指定月份以及以后所有的月份)
-			//3、更新日程事件重复信息主体,将截止日期改为指定ID所在的日期的前一天的23:59:59
-			calendar_EventRepeatMaster = emc.find( repeatMasterId, Calendar_EventRepeatMaster.class );
-			if( calendar_EventRepeatMaster == null ) {
-				throw new Exception("calendar repeat master not exists, calendar can not save! MasterID:" + repeatMasterId );
-			}
-			//事件权限保障:对日历事件重复信息主体进行权限设置,保证至少自己创建的日历自己可以管理 ,可以发布,可以查看
-			addStringToList( effectivePerson.getDistinguishedName(), calendar_EventRepeatMaster.getParticipants() );
-			addStringToList( effectivePerson.getDistinguishedName(), calendar_EventRepeatMaster.getManageablePersonList() );
-			addStringToList( effectivePerson.getDistinguishedName(), calendar_EventRepeatMaster.getViewablePersonList() );
-			if( StringUtils.isEmpty( calendar_EventRepeatMaster.getCreatePerson() )) {
-				calendar_EventRepeatMaster.setCreatePerson( effectivePerson.getDistinguishedName() );
-			}
-			if( StringUtils.isEmpty( calendar_EventRepeatMaster.getUpdatePerson() )) {
-				calendar_EventRepeatMaster.setUpdatePerson( effectivePerson.getDistinguishedName() );
-			}
-			//删除事件当月和之后的所有已经生成的月份信息记录,便于后续再次重新生成
-			if( ListTools.isNotEmpty( calendar_EventRepeatMaster.getCreatedMonthList() )) {
-				eventYearAndMonth = dateOperation.getYearAndMonth( calendar_event.getStartTime() );
-				if( StringUtils.isNotEmpty( eventYearAndMonth )) {
-					eventMonth = dateOperation.format_year_month.parse( eventYearAndMonth );
-					for( String yearAndMonth : calendar_EventRepeatMaster.getCreatedMonthList() ) {
-						//判断是否在eventYearAndMonth之前,在则添加到createdMonthList,否删除不添加
-						createdMonth = dateOperation.format_year_month.parse( yearAndMonth );
-						if( eventMonth.getTime() >= createdMonth.getTime() ) {
-							createdMonthList.add( yearAndMonth );
-						}
-					}
-				}
-			}
-			calendar_EventRepeatMaster.setCreatedMonthList( createdMonthList );
-			//将截止日期改为指定ID所在的日期的前一天的23:59:59
-			Date repeatEndTime = dateOperation.getEndTimeInDay( dateOperation.getDayAddDate( calendar_event.getStartTime(), -1 ) );
-			RRule rule = new RRule( calendar_EventRepeatMaster.getRecurrenceRule() );
-			Recur recur = rule.getRecur();
-			recur.setUntil( new net.fortuna.ical4j.model.Date(repeatEndTime) );		
-			calendar_EventRepeatMaster.setRecurrenceRule( new RRule(recur).getValue());
-			
-			calendar_EventRepeatMaster_new = copyEventPropertyToMaster( calendar_event );
-			calendar_EventRepeatMaster_new.setRecurrenceStartTime( calendar_event.getStartTime() );
-
-			//处理新的calendar_EventRepeatMaster_new的备注信息,原来的calendar_EventRepeatMaster不动
-			Calendar_EventComment calendar_EventComment = calendar_EventService.createNewEventComment( emc, calendar_event );
-			if( calendar_EventComment != null ){
-				calendar_EventRepeatMaster_new.setComment( "{#CLOB#}" );
-				calendar_EventRepeatMaster_new.setCommentId( calendar_EventComment.getId() );
-			}else{
-				calendar_EventRepeatMaster_new.setCommentId( null );
-			}
-
-			emc.beginTransaction( Calendar_EventRepeatMaster.class );	
-			emc.check( calendar_EventRepeatMaster, CheckPersistType.all );
-			emc.persist( calendar_EventRepeatMaster_new, CheckPersistType.all  );
-			emc.commit();
-
-		} catch ( Exception e ) {
-			throw e;
-		}
-		return count;
-	}	
-	/**
-	 * 更新单个日历事件记录信息
-	 * 
-	 * @param calendar_event
-	 * @param effectivePerson 
-	 * @return
-	 * @throws Exception
-	 */
-	public Calendar_Event updateSingleEvent( Calendar_Event calendar_event, EffectivePerson effectivePerson ) throws Exception {
-
-		//对日历信息进行权限设置,至少自己创建的日历自己可以管理 ,可以发布,可以查看
-		addStringToList( effectivePerson.getDistinguishedName(), calendar_event.getParticipants() );
-		addStringToList( effectivePerson.getDistinguishedName(), calendar_event.getManageablePersonList() );
-		addStringToList( effectivePerson.getDistinguishedName(), calendar_event.getViewablePersonList() );
-		
-		if( StringUtils.isEmpty( calendar_event.getCreatePerson() )) {
-			calendar_event.setCreatePerson( effectivePerson.getDistinguishedName() );
-		}
-		if( StringUtils.isEmpty( calendar_event.getUpdatePerson() )) {
-			calendar_event.setUpdatePerson( effectivePerson.getDistinguishedName() );
-		}
-		
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {			
-			Calendar_Event old_event = emc.find( calendar_event.getId(), Calendar_Event.class );
-			if( old_event == null ) {
-				throw new Exception("calendar event is not exsits. ID:" + calendar_event.getId() );
-			}
-			calendar_event.copyTo( old_event, JpaObject.FieldsUnmodify );
-			if( StringUtils.isEmpty( calendar_event.getId() )) {
-				old_event.setId( Calendar_Event.createId() );
-			}
-			//检查日程备注信息的长度,如果超长,则需要新建一个Calendar_EventComment记录
-			//如果超长,则创建一个新的则需要新建一个Calendar_EventComment记录
-			Calendar_EventComment calendar_EventComment = calendar_EventService.createNewEventComment( emc, calendar_event );
-			if( calendar_EventComment != null ){
-				old_event.setComment( "{#CLOB#}" );
-				old_event.setCommentId( calendar_EventComment.getId() );
-			}else{
-				old_event.setCommentId( null );
-			}
-
-			emc.beginTransaction( Calendar_Event.class );
-			if( StringUtils.isEmpty( old_event.getRepeatMasterId() ) ){
-				//原来不是重复的日程,修改后复重的日程,保存为重复信息主体
-				if( StringUtils.isNotEmpty( calendar_event.getRecurrenceRule()) ) {
-					Calendar_EventRepeatMaster calendar_EventRepeatMaster = composeEventRepeatMasterWithEvent( calendar_event );
-					old_event.setRepeatMasterId( calendar_EventRepeatMaster.getId() );
-					emc.beginTransaction( Calendar_EventRepeatMaster.class );
-					calendar_EventRepeatMasterService.create(emc, calendar_EventRepeatMaster, false );
-				}
-			}else{
-				if( StringUtils.isEmpty( calendar_event.getRecurrenceRule()) ) {
-					//原来是重复的,现在不重复了,需要把repeatMaster删除,还有已经生成的所有event
-					if( StringUtils.isNotEmpty( old_event.getRepeatMasterId() )){
-						ArrayList arrayList = new ArrayList<>();
-						arrayList.add( old_event.getId() );
-						calendar_EventRepeatMasterService.destoryWithMasterId( emc, old_event.getRepeatMasterId(), arrayList );
-					}
-				}
-			}
-
-			//保存日程信息
-			calendar_event = calendar_EventService.update( emc, old_event, false );
-			emc.commit();
-		} catch ( Exception e ) {
-			throw e;
-		}
-		return calendar_event;
-	}	
-
-	/**
-	 * 将一个字符串添加到一个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 );
-			}
-		}
-	}
-	
-	private Calendar_EventRepeatMaster composeEventRepeatMasterWithEvent( Calendar_Event calendar_event ) throws Exception {
-		Calendar_EventRepeatMaster calendar_EventRepeatMaster = new Calendar_EventRepeatMaster( 
-				Calendar_EventRepeatMaster.createId(), 
-				calendar_event.getTitle(), 
-				calendar_event.getStartTime(), 
-				calendar_event.getEndTime(), 
-				calendar_event.getRecurrenceRule()
-		);
-		calendar_event.copyTo( calendar_EventRepeatMaster, JpaObject.FieldsUnmodify );
-		calendar_EventRepeatMaster.setCalendarId( calendar_event.getCalendarId() );
-		return calendar_EventRepeatMaster;
-	}
-
-	/**
-	 * 根据条件查询指定的日历记录信息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 {
-		if( startTime == null ) {
-			startTime = new Date();
-		}
-		if( endTime == null ) {
-			endTime = new Date();
-		}
-		if( startTime.after( endTime )) {
-			//换个位置
-			Date tmp = startTime;
-			startTime = endTime;
-			endTime = tmp;
-		}
-		
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
-			//两个时间之间的月份查出来,看看这些月份是否需要生成日历事件
-			List<String> needCreateMonths = new DateOperation().listMonthsBetweenDate( startTime, endTime );
-			
-			if( ListTools.isNotEmpty( needCreateMonths )) {
-				List<String> repeatMasterIds = new ArrayList<>();
-				List<String> repeatMasterIds_month = null;
-
-				for( String createMonth : needCreateMonths ) {
-					//先看看有没有需要生成的日历重复主体
-					repeatMasterIds_month = calendar_EventRepeatMasterService.listNeedRepeatMaster( emc, calendarIds,  eventType, createMonth, personName, unitNames, groupNames);
-					if( ListTools.isNotEmpty( repeatMasterIds_month )){
-						repeatMasterIds.addAll( repeatMasterIds_month );
-					}
-				}
-				if( ListTools.isNotEmpty( repeatMasterIds )) {
-					//根据日期范围为指定的日期重复主体生成日历事件信息
-					calendar_EventService.createCalendarWithMaster( emc, repeatMasterIds, startTime, endTime, needCreateMonths );
-				}
-			}
-			
-			//最后从日历事件信息表里按条件进行数据查询返回
-			return calendar_EventService.listWithCondition( emc, key, eventType, source, createPerson, calendarIds, 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_EventService.listWithCondition(emc, null, null, null, null, inFilterCalendarIds, personName, unitNames, 
-					 groupNames, startTime, endTime );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-	
-	/**
-	 * 根据重复主体以及日期范围查询指定的日历记录信息ID列表
-	 * @param repeatMasterId
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listWithRepeatMaster( String repeatMasterId, Date startTime, Date endTime ) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			 return calendar_EventService.listWithRepeatMaster(emc, repeatMasterId, startTime, endTime);
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 根据ID彻底删除指定的日历记录信息
-	 * @param id
-	 * @throws Exception
-	 */
-	public void destory(String id) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			 calendar_EventService.destory(emc, id );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	public void destory(List<String> ids) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			 calendar_EventService.destory(emc, ids );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-	
-	/**
-	 *  删除重复日程事件中某一事件开始后续所有的日程事件信息(一定是重复日程)
-	 *  
-	 * 1、删除当前事件以及该重复事件主体信息已经生成的该ID事件后续时间内所有已经生成的日程事件信息
-	 * 2、更新日程事件重复信息主体,将截止日期改为指定ID所在的日期的前一天的23:59:59
-	 * 
-	 * @param repeatMasterId
-	 * @param calendar_event
-	 * @return
-	 * @throws Exception
-	 */
-	public Integer destoryAfterEventId( String repeatMasterId, Calendar_Event calendar_event ) throws Exception {		
-		
-		if( StringUtils.isEmpty( repeatMasterId )) {
-			throw new Exception("calendar repeat master id is empty, calendar can not delete!" );
-		}
-		
-		if( calendar_event == null ) {
-			throw new Exception("calendar event is null, calendar can not delete!" );
-		}
-		
-		Integer count = 0;
-		Business business = null;
-		List<String> eventIds = null;
-		List<Calendar_Event> calendarEvents = null;
-		Calendar_EventRepeatMaster calendar_EventRepeatMaster = null;
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			calendar_EventRepeatMaster = emc.find( calendar_event.getRepeatMasterId(), Calendar_EventRepeatMaster.class );
-			
-			//-----------------------------------------------------------------------------------------------------------------
-			//1、删除当前事件以及该重复事件主体信息已经生成的该ID事件后续时间内所有已经生成的日程事件信息
-			eventIds = business.calendar_EventFactory().listWithRepeatMaster(repeatMasterId, calendar_event.getStartTime(), null );
-			if( ListTools.isNotEmpty( eventIds )) {
-				count = eventIds.size();
-				calendarEvents = business.calendar_EventFactory().list( eventIds );
-			}
-			if( ListTools.isNotEmpty( calendarEvents )) {
-				emc.beginTransaction( Calendar_Event.class );	
-				for( Calendar_Event calendar_Event : calendarEvents ) {
-					emc.remove( calendar_Event, CheckRemoveType.all );
-				}
-			}
-			
-			//将截止日期改为指定ID所在的日期的前一天的23:59:59
-			Date repeatEndTime = dateOperation.getEndTimeInDay( dateOperation.getDayAddDate( calendar_event.getStartTime(), -1 ) );
-			RRule rule = new RRule( calendar_EventRepeatMaster.getRecurrenceRule() );
-			Recur recur = rule.getRecur();
-			recur.setUntil( new net.fortuna.ical4j.model.Date(repeatEndTime) );		
-			calendar_EventRepeatMaster.setRecurrenceRule( new RRule(recur).getValue());
-			
-			emc.beginTransaction( Calendar_EventRepeatMaster.class );
-			emc.check( calendar_EventRepeatMaster, CheckPersistType.all );
-			emc.commit();
-		} catch ( Exception e ) {
-			throw e;
-		}
-		return count;
-	}	
-	
-	/**
-	 * 将一个日程事件对象转换为一个iCal4j的Calendar对象
-	 * @param o2_calendar_event
-	 * @return
-	 */
-	public net.fortuna.ical4j.model.Calendar parseToiCal( Calendar_Event o2_calendar_event ){
-		// 创建日历
-        Calendar calendar = null;
-		try {
-            calendar = new Calendar();
-            calendar.getProperties().add(new ProdId("-//O2OA//iCal4j 1.0//EN"));
-            calendar.getProperties().add(Version.VERSION_2_0);
-            calendar.getProperties().add(CalScale.GREGORIAN);
-            
-            // 时间主题
-            String summary = null;
-            if( StringUtils.isNotEmpty( o2_calendar_event.getTitle() )) {
-            	summary = o2_calendar_event.getTitle();
-            }else {
-            	summary = "未命名-日程事件";
-            }
-            
-            if( o2_calendar_event.getStartTime() == null ) {
-            	throw new Exception("event start time is null!");
-            }
-            
-            if( o2_calendar_event.getEndTime() == null ) {
-            	throw new Exception("event end time is null!");
-            }
-            
-            // 开始时间
-            DateTime start = new DateTime(o2_calendar_event.getStartTime().getTime());
-            // 开始时间转换为UTC时间(UTC + 时区差 = 本地时间 )
-            start.setUtc(true);
-            // 结束时间
-            DateTime end = new DateTime(o2_calendar_event.getEndTime().getTime());
-            // 结束时间设置成UTC时间(UTC + 时区差 = 本地时间 )
-            end.setUtc(true);
-            
-            VEvent  event = new VEvent( start, end, summary );         
-            if( StringUtils.isNotEmpty( o2_calendar_event.getLocationName() )) {
-            	event.getProperties().add(new Location(o2_calendar_event.getLocationName()));
-            }
-            
-            // 生成唯一标示
-            event.getProperties().add(new Uid( o2_calendar_event.getId() ));
-           
-            // 创建一个时区(TimeZone)
-            TimeZoneRegistry registry = TimeZoneRegistryFactory.getInstance().createRegistry();
-            TimeZone timezone = registry.getTimeZone("Asia/Shanghai");
-            VTimeZone tz = timezone.getVTimeZone();
-            // 添加时区信息
-            event.getProperties().add(tz.getTimeZoneId());
-           
-            //添加备注信息
-            if( StringUtils.isNotEmpty( o2_calendar_event.getComment() )) {
-            	 Comment comment = new Comment(o2_calendar_event.getComment() );
-                 event.getProperties().add(comment);
-            }
-            
-            // 添加参与者
-            if( ListTools.isNotEmpty( o2_calendar_event.getParticipants() )) {
-            	 Attendee attendee = null;
-            	for( String participant : o2_calendar_event.getParticipants()  ) {
-            		attendee = new Attendee();
-            		attendee.getParameters().add(Role.OPT_PARTICIPANT);
-            		attendee.getParameters().add(new Cn(participant));
-                    event.getProperties().add(attendee);
-            	}
-            }             
-             
-            // 重复事件 START------------------------------------------------------------     
-            if( StringUtils.isNotEmpty( o2_calendar_event.getRecurrenceRule() )) {
-            	 RRule rule = new RRule(o2_calendar_event.getRecurrenceRule());
-                 event.getProperties().add(rule);
-            }
-           // 重复事件 END------------------------------------------------------------
-            
-            
-            // 提醒,提前10分钟
-            if( StringUtils.isNotEmpty( o2_calendar_event.getValarmTime_config() ) ) {
-            	String[] time_config = o2_calendar_event.getValarmTime_config().split(",");
-            	VAlarm valarm = null;
-            	if( time_config != null && time_config.length == 4 ) {
-            		int day = Integer.parseInt(  time_config[0] );
-            		int hour = Integer.parseInt(  time_config[1] );
-            		int min = Integer.parseInt(  time_config[2] );
-            		int sec = Integer.parseInt(  time_config[3] );
-            		
-            		valarm = new VAlarm(new Dur(day, hour, min, sec));
-            		if( StringUtils.isNotEmpty( o2_calendar_event.getValarm_Summary() )) {
-            			valarm.getProperties().add(new Summary(o2_calendar_event.getValarm_Summary()));
-            		}else {
-            			valarm.getProperties().add(new Summary("日程事件提醒"));
-            		}
-                    valarm.getProperties().add(Action.AUDIO);
-                    valarm.getProperties().add(Action.DISPLAY);
-                    //valarm.getProperties().add(Action.EMAIL);
-                    if( StringUtils.isNotEmpty( o2_calendar_event.getValarm_description() )) {
-                    	valarm.getProperties().add(new Description(o2_calendar_event.getValarm_description()));
-                    }
-                    // 将VAlarm加入VEvent
-                    event.getAlarms().add(valarm);
-            	}
-            }
-            // 添加事件
-            calendar.getComponents().add(event);
-            // 验证
-            calendar.validate();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-		return calendar;
-	}
-	
-	/**
-	 * 验证一个日历是否符合ICAL要求
-	 * @param o2_calendar_event
-	 * @throws ValidationException
-	 * @throws IOException
-	 */
-	public Boolean validateCalendar( Calendar_Event o2_calendar_event ) throws ValidationException, IOException{
-		net.fortuna.ical4j.model.Calendar calendar = parseToiCal(o2_calendar_event);
-		calendar.validate();
-		return true;
-	}
-	
-	/**
-	 * 将一个日程事件写为一个ical文件
-	 * @param o2_calendar_event
-	 * @param path
-	 * @throws ValidationException
-	 * @throws IOException
-	 */
-	public void writeiCal( Calendar_Event o2_calendar_event, String path ) throws ValidationException, IOException{
-		net.fortuna.ical4j.model.Calendar calendar = parseToiCal(o2_calendar_event);
-		FileOutputStream fout = new FileOutputStream("D://2.ics");
-        CalendarOutputter outputter = new CalendarOutputter();
-        outputter.output(calendar, fout );
-	}
-
-	/**
-	 * 将一个日程事件写为一个ical文件
-	 * @param o2_calendar_event
-	 * @param out
-	 * @throws ValidationException
-	 * @throws IOException
-	 */
-	public void wirteiCal( Calendar_Event o2_calendar_event, OutputStream out ) throws ValidationException, IOException{
-		net.fortuna.ical4j.model.Calendar calendar = parseToiCal(o2_calendar_event);
-        CalendarOutputter outputter = new CalendarOutputter();
-        outputter.output(calendar, out );
-	}
-	
-	/**
-	 * 获取一个日程事件转换为ICAL后的内容信息
-	 * @param o2_calendar_event
-	 * @throws ValidationException
-	 * @throws IOException
-	 */
-	public String getiCalContent( Calendar_Event o2_calendar_event) throws ValidationException, IOException{
-		net.fortuna.ical4j.model.Calendar calendar = parseToiCal(o2_calendar_event);
-		CalendarOutputter calendarOutputter = new CalendarOutputter(false); 
-		ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
-		calendarOutputter.output(calendar, baos); 
-		return new String(baos.toByteArray(), "utf-8");
-	}
-	
-	/**
-	 * 查询需要提醒的日程事件ID列表
-	 * @param date
-	 * @return
-	 * @throws Exception 
-	 */
-	public List<String> listNeedAlarmEventIds(Date date) throws Exception {
-		if( date == null ) {
-			date = new Date();
-		}
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return calendar_EventService.listNeedAlarmEventIds( emc, date );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-	
-	/**
-	 * 根据calendar_event创建一个新的重复主体
-	 * @param calendar_event
-	 * @return
-	 */
-	private Calendar_EventRepeatMaster copyEventPropertyToMaster( Calendar_Event calendar_event ) {
-		Calendar_EventRepeatMaster calendar_EventRepeatMaster = new Calendar_EventRepeatMaster();
-		return copyEventPropertyToMaster( calendar_event, calendar_EventRepeatMaster );
-	}
-	
-	/**
-	 * 根据calendar_event信息更新一个新的重复主体
-	 * @param calendar_event
-	 * @return
-	 */
-	private Calendar_EventRepeatMaster copyEventPropertyToMaster( Calendar_Event calendar_event, Calendar_EventRepeatMaster calendar_EventRepeatMaster ) {
-		if( calendar_event != null && calendar_EventRepeatMaster != null ) {
-			Date recurrenceStartTime = calendar_EventRepeatMaster.getRecurrenceStartTime();
-			Date startTime = calendar_EventRepeatMaster.getStartTime();
-			
-			Date startTime_event = calendar_event.getStartTime();
-			Date recurrenceStartTime_new = null;
-			Date startTime_new = null;
-			
-			//修改一下开始时间的时分秒
-			String newRecurrenceStartTime_str = dateOperation.getDate( recurrenceStartTime, "yyyy-MM-dd") + " " + dateOperation.getDate( startTime_event, "HH:mm:ss");
-			String newStartTime_str = dateOperation.getDate( startTime, "yyyy-MM-dd") + " " + dateOperation.getDate( startTime_event, "HH:mm:ss");
-			try {
-				recurrenceStartTime_new = dateOperation.getDateFromString( newRecurrenceStartTime_str, "yyyy-MM-dd HH:mm:ss");
-			} catch (Exception e) {
-				recurrenceStartTime_new = recurrenceStartTime;
-				e.printStackTrace();
-			}
-			try {
-				startTime_new = dateOperation.getDateFromString( newStartTime_str, "yyyy-MM-dd HH:mm:ss");
-			} catch (Exception e) {
-				startTime_new = startTime;
-				e.printStackTrace();
-			}
-			
-			calendar_EventRepeatMaster.setAlarm( calendar_event.getAlarm() );
-			calendar_EventRepeatMaster.setAlarmTime( calendar_event.getAlarmTime() );
-			calendar_EventRepeatMaster.setCalendarId( calendar_event.getCalendarId() );
-			calendar_EventRepeatMaster.setComment( calendar_event.getComment() );
-			calendar_EventRepeatMaster.setCreatePerson( calendar_event.getCreatePerson() );
-			calendar_EventRepeatMaster.setDaysOfDuration( calendar_event.getDaysOfDuration() );
-			calendar_EventRepeatMaster.setEventType( calendar_event.getEventType() );
-			calendar_EventRepeatMaster.setIsAllDayEvent( calendar_event.getIsAllDayEvent() );
-			calendar_EventRepeatMaster.setIsPublic( calendar_event.getIsPublic() );
-			calendar_EventRepeatMaster.setLatitude( calendar_event.getLatitude() );
-			calendar_EventRepeatMaster.setLocationName( calendar_event.getLocationName() );
-			calendar_EventRepeatMaster.setLongitude( calendar_event.getLongitude() );
-			calendar_EventRepeatMaster.setManageablePersonList( calendar_event.getManageablePersonList() );
-			calendar_EventRepeatMaster.setParticipants( calendar_event.getParticipants() );
-			calendar_EventRepeatMaster.setRecurrenceExc( calendar_event.getRecurrenceExc() );
-			calendar_EventRepeatMaster.setRecurrenceRule( calendar_event.getRecurrenceRule() );
-			calendar_EventRepeatMaster.setRepeatStatus( "等待生成" );
-			calendar_EventRepeatMaster.setSource( calendar_event.getSource() );
-			calendar_EventRepeatMaster.setTargetType( calendar_event.getTargetType() );
-			calendar_EventRepeatMaster.setTitle( calendar_event.getTitle() );
-			calendar_EventRepeatMaster.setUpdatePerson( calendar_event.getUpdatePerson() );
-			calendar_EventRepeatMaster.setValarm_description( calendar_event.getValarm_description() );
-			calendar_EventRepeatMaster.setValarm_mailto( calendar_event.getValarm_mailto() );
-			calendar_EventRepeatMaster.setValarm_Summary( calendar_event.getValarm_Summary() );
-			calendar_EventRepeatMaster.setValarmTime_config( calendar_event.getValarmTime_config() );
-			calendar_EventRepeatMaster.setViewableGroupList( calendar_event.getViewableGroupList() );
-			calendar_EventRepeatMaster.setViewableUnitList( calendar_event.getViewableUnitList() );
-			calendar_EventRepeatMaster.setColor( calendar_event.getColor() );
-			calendar_EventRepeatMaster.setRecurrenceStartTime( recurrenceStartTime_new );
-			calendar_EventRepeatMaster.setStartTime( startTime_new );
-			calendar_EventRepeatMaster.setEndTime( calendar_event.getEndTime() );
-		}
-		return calendar_EventRepeatMaster;
-	}
-
-	public List<String> destoryWithBundle(String bundle) throws Exception {
-		if( StringUtils.isEmpty( bundle ) ) {
-			throw new Exception("bundle is null!");
-		}
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return calendar_EventService.destoryWithBundle( emc, bundle );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 根据commentId获取Calendar_EventComment信息
-	 * @param commentId
-	 * @return
-	 * @throws Exception
-	 */
-	public Calendar_EventComment getCommentWithCommentId(String commentId) throws Exception {
-		if( StringUtils.isEmpty( commentId ) ) {
-			return null;
-		}
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return emc.find( commentId, Calendar_EventComment.class );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-}

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

@@ -1,181 +0,0 @@
-package com.x.calendar.assemble.control.service;
-
-import java.util.List;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.entity.annotation.CheckPersistType;
-import com.x.base.core.entity.annotation.CheckRemoveType;
-import com.x.calendar.assemble.control.Business;
-import com.x.calendar.core.entity.Calendar_Setting;
-import com.x.calendar.core.entity.Calendar_SettingLobValue;
-
-
-/**
- * 日程管理系统设置服务类
- * @author O2LEE
- *
- */
-public class Calendar_SettingService {
-	
-	//private Logger logger = LoggerFactory.getLogger( Calendar_SettingService.class );
-
-	/**
-	 * 获取所有的系统设置信息
-	 * @return
-	 * @throws Exception
-	 */
-	public List<Calendar_Setting> listAll( EntityManagerContainer emc ) throws Exception {
-		Business business =  new Business( emc );
-		return business.calendar_SettingFactory().listAll();
-	}
-	
-	/**
-	 * 根据ID获取指定的系统设置信息
-	 * @param id
-	 * @return
-	 * @throws Exception
-	 */
-	public Calendar_Setting get( EntityManagerContainer emc, String id ) throws Exception {
-		return emc.find(id, Calendar_Setting.class);
-	}
-
-	/**
-	 * 根据ID删除指定的系统设置信息
-	 * @param id
-	 * @throws Exception
-	 */
-	public void delete( EntityManagerContainer emc, String id ) throws Exception {
-		Calendar_Setting report_S_Setting = null;
-		if( id == null || id.isEmpty() ){
-			throw new Exception( "id is null, system can not delete any object." );
-		}
-		report_S_Setting = emc.find( id, Calendar_Setting.class );
-		if ( null == report_S_Setting ) {
-			throw new Exception( "object is not exist {'id':'"+ id +"'}" );
-		}else{
-			emc.beginTransaction( Calendar_Setting.class );
-			emc.remove( report_S_Setting, CheckRemoveType.all );
-			emc.commit();
-		}
-	}
-	/**
-	 * 根据设置编码获取指定的设置信息
-	 * @param code
-	 * @return
-	 * @throws Exception
-	 */
-	public Calendar_Setting getByCode( EntityManagerContainer emc, String code ) throws Exception {
-		List<Calendar_Setting> report_S_SettingList = null;
-		Calendar_Setting report_S_Setting = null;
-		List<String> ids = null;
-		Business business = new Business( emc );
-		if( code == null || code.isEmpty() ){
-			throw new Exception( "code is null, system can not query any object." );
-		}
-		
-		ids = business.calendar_SettingFactory().listIdsByCode(code);
-		if( ids != null && !ids.isEmpty() ){
-			report_S_SettingList =  business.calendar_SettingFactory().list( ids );
-		}
-		
-		if( report_S_SettingList != null && !report_S_SettingList.isEmpty() ){
-			for( int i=0; i< report_S_SettingList.size(); i++  ){
-				if( i == 0 ){
-					report_S_Setting = report_S_SettingList.get( i );
-				}else{
-					emc.beginTransaction( Calendar_Setting.class );
-					emc.remove( report_S_SettingList.get( i ), CheckRemoveType.all );
-					emc.commit();
-				}
-			}
-		}
-		return report_S_Setting;
-	}
-
-	/**
-	 * 创建系统设置信息
-	 * @param report_S_Setting
-	 * @return
-	 * @throws Exception
-	 */
-	public Calendar_Setting create( EntityManagerContainer emc, Calendar_Setting report_S_Setting ) throws Exception {
-		Calendar_Setting report_S_Setting_old = null;
-		Calendar_SettingLobValue reportSettingLobValue = null;
-		
-		report_S_Setting_old = emc.find( report_S_Setting.getId(), Calendar_Setting.class );
-		if( report_S_Setting_old != null ){
-			throw new Exception("report_S_Setting{'id':' "+ report_S_Setting.getId() +" '} exists, can not create new object");
-		}else{
-			emc.beginTransaction( Calendar_Setting.class );
-
-			//对长文本记录进行操作
-			if( report_S_Setting.getIsLob() ) {
-				emc.beginTransaction( Calendar_SettingLobValue.class );
-				reportSettingLobValue = emc.find( report_S_Setting.getId(), Calendar_SettingLobValue.class );
-				if( reportSettingLobValue != null ) {
-					reportSettingLobValue.setLobValue( report_S_Setting.getConfigValue() );//更新值
-					emc.check( reportSettingLobValue, CheckPersistType.all );
-				}else {
-					//没有,就创建一个LOB值记录
-					reportSettingLobValue = new Calendar_SettingLobValue();
-					reportSettingLobValue.setId( report_S_Setting.getId() );
-					reportSettingLobValue.setLobValue( report_S_Setting.getConfigValue() );
-					emc.persist( reportSettingLobValue, CheckPersistType.all );
-				}
-				report_S_Setting.setConfigValue( "LobValue" );
-			}
-			
-			emc.persist( report_S_Setting, CheckPersistType.all);
-			emc.commit();
-		}
-		return report_S_Setting;
-	}
-	
-	/**
-	 * 更新系统设置信息
-	 * @param report_S_Setting
-	 * @return
-	 * @throws Exception
-	 */
-	public Calendar_Setting update( EntityManagerContainer emc, Calendar_Setting report_S_Setting ) throws Exception {
-		if( report_S_Setting == null ){
-			throw new Exception("report_S_Setting is null, can not update object!");
-		}
-		Calendar_Setting report_S_Setting_old = null;
-		Calendar_SettingLobValue reportSettingLobValue = null;
-		Business business = new Business(emc);
-		report_S_Setting_old = business.calendar_SettingFactory().getWithConfigCode(report_S_Setting.getConfigCode());
-		if( report_S_Setting_old != null ){
-			emc.beginTransaction( Calendar_Setting.class );
-			report_S_Setting_old.setConfigCode( report_S_Setting.getConfigCode() );
-			report_S_Setting_old.setConfigName( report_S_Setting.getConfigName() );
-			report_S_Setting_old.setConfigValue( report_S_Setting.getConfigValue() );
-			report_S_Setting_old.setOrderNumber( report_S_Setting.getOrderNumber() );
-			report_S_Setting_old.setIsLob( report_S_Setting.getIsLob() );
-			
-			//对长文本记录进行操作
-			if( report_S_Setting_old.getIsLob() ) {
-				emc.beginTransaction( Calendar_SettingLobValue.class );
-				reportSettingLobValue = emc.find( report_S_Setting.getId(), Calendar_SettingLobValue.class );
-				if( reportSettingLobValue != null ) {
-					reportSettingLobValue.setLobValue( report_S_Setting.getConfigValue() );//更新值
-					emc.check( reportSettingLobValue, CheckPersistType.all );
-				}else {
-					//没有,就创建一个LOB值记录
-					reportSettingLobValue = new Calendar_SettingLobValue();
-					reportSettingLobValue.setId( report_S_Setting.getId() );
-					reportSettingLobValue.setLobValue( report_S_Setting.getConfigValue() );
-					emc.persist( reportSettingLobValue, CheckPersistType.all );
-				}
-				report_S_Setting_old.setConfigValue( "LobValue" );
-			}
-			emc.check( report_S_Setting_old, CheckPersistType.all);
-			emc.commit();
-		}else{
-			throw new Exception("old object report_S_Setting{'id':' "+ report_S_Setting.getId() +" '} is not exists. ");
-		}
-		
-		return report_S_Setting_old;
-	}
-
-}

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

@@ -1,127 +0,0 @@
-package com.x.calendar.assemble.control.service;
-
-import java.util.List;
-
-import com.x.base.core.container.EntityManagerContainer;
-import com.x.base.core.container.factory.EntityManagerContainerFactory;
-import com.x.calendar.assemble.control.Business;
-import com.x.calendar.core.entity.Calendar_Setting;
-import com.x.calendar.core.entity.Calendar_SettingLobValue;
-
-
-/**
- * 日程管理系统设置服务类
- * @author O2LEE
- *
- */
-public class Calendar_SettingServiceAdv{
-
-	private Calendar_SettingService calendar_SettingService = new Calendar_SettingService();
-	
-	/**
-	 * 获取所有的系统设置信息
-	 * @return
-	 * @throws Exception
-	 */
-	public List<Calendar_Setting> listAll() throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return calendar_SettingService.listAll( emc );	
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 根据ID获取指定的系统设置信息
-	 * @param id
-	 * @return
-	 * @throws Exception
-	 */
-	public Calendar_Setting get(String id) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			return calendar_SettingService.get( emc, id );	
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 保存系统设置信息
-	 * @param calendar_Setting
-	 * @return
-	 * @throws Exception
-	 */
-	public Calendar_Setting save( Calendar_Setting calendar_Setting ) throws Exception {
-		Calendar_Setting calendar_Setting_old = null;
-		Business business = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			calendar_Setting_old = business.calendar_SettingFactory().getWithConfigCode(calendar_Setting.getConfigCode());
-			if( calendar_Setting_old != null ){
-				calendar_Setting.setId( calendar_Setting_old.getId() );
-				return calendar_SettingService.update( emc, calendar_Setting );	
-			}else{
-				return calendar_SettingService.create( emc, calendar_Setting );	
-			}
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 根据设置编码获取指定的设置信息
-	 * @param code
-	 * @return
-	 * @throws Exception
-	 */
-	public Calendar_Setting getByCode( String code ) throws Exception {
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			 return calendar_SettingService.getByCode( emc, code );	
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-	
-	/**
-	 * 根据编码获取指定的设置信息的具体配置值
-	 * @param code
-	 * @return
-	 * @throws Exception
-	 */
-	public String getValueByCode( String code ) throws Exception {
-		Calendar_Setting calendar_Setting = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			calendar_Setting = calendar_SettingService.getByCode( emc, code );
-			if( calendar_Setting != null ) {
-				if( !calendar_Setting.getIsLob() ) {
-					return calendar_Setting.getConfigValue();
-				}else {
-					return getLobValueWithId( calendar_Setting.getId() );
-				}
-			}
-		} catch ( Exception e ) {
-			throw e;
-		}
-		return null;
-	}
-
-	/**
-	 * 根据ID获取配置值信息
-	 * @param id
-	 * @return
-	 * @throws Exception
-	 */
-	public String getLobValueWithId( String id ) throws Exception {
-		Calendar_SettingLobValue lobValue = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			lobValue = emc.find( id, Calendar_SettingLobValue.class );
-			if( lobValue != null ) {
-				return lobValue.getLobValue();
-			}
-		} catch ( Exception e ) {
-			throw e;
-		}
-		return null;
-	}
-	
-}

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

@@ -1,647 +0,0 @@
-package com.x.calendar.assemble.control.service;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-
-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.organization.Person;
-import com.x.base.core.project.organization.Unit;
-import com.x.base.core.project.tools.ListTools;
-import com.x.calendar.assemble.control.Business;
-
-
-/**
- * 组织人员角色相关信息的服务类
- * 
- * @author O2LEE
- */
-public class UserManagerService {
-	
-	/**
-	 * 根据员工姓名获取组织名称
-	 * 如果用户有多个身份,则取组织级别最大的组织名称
-	 * 
-	 * @param personName
-	 * @return
-	 * @throws Exception
-	 */
-	public String getUnitNameWithPerson( String personName ) throws Exception {
-		List<String> unitNames = null;		
-		Business business = null;
-		Integer level = 0;
-		String result = null;
-		Unit unit = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			unitNames = business.organization().unit().listWithPerson( personName );
-			if( unitNames != null && !unitNames.isEmpty() ) {
-				for( String unitName : unitNames ) {
-					unit = business.organization().unit().getObject( unitName );
-					if( level < unit.getLevel() ) {
-						level = unit.getLevel();
-						result = unitName;
-					}
-				}
-			}
-		} catch ( Exception e ) {
-			throw e;
-		}
-		return result;
-	}
-	
-	/**
-	 * 根据身份名称获取身份所属的组织名称
-	 * 
-	 * @param identity
-	 * @return
-	 * @throws Exception
-	 */
-	public String getUnitNameByIdentity( String identity ) throws Exception {
-		Business business = null;
-		String unitName = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			unitName = business.organization().unit().getWithIdentity( identity );
-			if ( unitName == null ) {// 该根据身份无法查询到组织信息
-				return null;
-			} else {
-				return unitName;
-			}
-		} catch( NullPointerException e ) {
-			return null;
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-	
-	/**
-	 * 根据身份名称获取身份所属的顶层组织名称
-	 * 
-	 * @param identity
-	 * @return
-	 * @throws Exception
-	 */
-	public String getTopUnitNameByIdentity( String identity ) throws Exception {
-		Business business = null;
-		String unitName = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			unitName = business.organization().unit().getWithIdentityWithLevel( identity, 1 );
-			if ( unitName == null ) {
-				return null;
-			} else {
-				return unitName;
-			}
-		} catch( NullPointerException e ) {
-			return null;
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-	
-	/**
-	 * 根据人员姓名获取人员所属的顶层组织名称,如果人员有多个身份,则取组织等级最大的身份
-	 * @param personName
-	 * @param level
-	 * @return
-	 * @throws Exception
-	 */
-	public String getTopUnitNameWithPerson( String personName ) throws Exception {
-		String identity = null;
-		String topUnitName = null;
-		Business business = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			//兼容一下传过来的perosnName有可能是个人,有可能是身份
-			personName = business.organization().person().get( personName );
-			identity = getIdentityWithPerson( personName );
-			if( identity != null && !identity.isEmpty() ){
-				topUnitName = business.organization().unit().getWithIdentityWithLevel( identity, 1 );
-			}
-			return topUnitName;
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 根据个人姓名,根据个人姓名获取所有身份中组织等级最高的一个身份
-	 * 
-	 * @param personName
-	 * @return
-	 * @throws Exception
-	 */
-	public String getIdentityWithPerson( String personName ) throws Exception {
-		List<String> identities = null;
-		String unitName = null;
-		Integer level = 0;
-		String resultIdentity = null;
-		Unit unit = null;
-		Business business = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			//兼容一下传过来的perosnName有可能是个人,有可能是身份
-			personName = business.organization().person().get( personName );
-			identities = business.organization().identity().listWithPerson( personName );
-			if( identities != null && !identities.isEmpty() ) {
-				for( String identity : identities ) {
-					unitName = business.organization().unit().getWithIdentity( identity );
-					unit = business.organization().unit().getObject( unitName );
-					if( level < unit.getLevel() ) {
-						level = unit.getLevel();
-						resultIdentity = identity;
-					}
-				}
-			}
-			return resultIdentity;
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 查询当前用户是否有指定的身份信息
-	 * @param name
-	 * @param loginIdentity
-	 * @return
-	 * @throws Exception 
-	 */
-	public boolean hasIdentity( String personName, String loginIdentity ) throws Exception {
-		if( loginIdentity == null || loginIdentity.isEmpty() ){
-			throw new Exception( "loginIdentity is null!" );
-		}
-		Business business = null;
-		List<String> identities = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			identities = business.organization().identity().listWithPerson( personName );
-			if( identities.contains( loginIdentity )){
-				return true;
-			}
-		} catch ( Exception e ) {
-			throw e;
-		}
-		return false;
-	}
-
-	/**
-	 * 根据用户的身份查询用户的姓名
-	 * @param identity
-	 * @return
-	 * @throws Exception 
-	 */
-	public String getPersonNameByIdentity( String identity ) throws Exception {
-		if( identity == null || identity.isEmpty() ){
-			throw new Exception( "identity is null!" );
-		}
-		Business business = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			return business.organization().person().getWithIdentity( identity );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}	
-
-	/**
-	 * 根据用户唯一标识来获取用户对象
-	 * @param flag
-	 * @return
-	 * @throws Exception
-	 */
-	public String getPersonNameWithFlag( String flag ) throws Exception {
-		if( flag == null || flag.isEmpty() ){
-			throw new Exception( "flag is null!" );
-		}
-		Business business = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			return business.organization().person().get( flag );
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 判断用户是否有指定的平台角色,比如CMS系统管理员
-	 * 
-	 * @param name
-	 * @param string
-	 * @return
-	 * @throws Exception
-	 */
-	public boolean isHasPlatformRole( String personName, String roleName) throws Exception {
-		if ( personName == null || personName.isEmpty()) {
-			throw new Exception("personName is null!");
-		}
-		if (roleName == null || roleName.isEmpty()) {
-			throw new Exception("roleName is null!");
-		}
-		
-		List<String> roleList = null;
-		String splitStr = null;
-		Business business = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			roleList = business.organization().role().listWithPerson( personName );
-			
-			if ( ListTools.isNotEmpty(roleList) ) {
-				for( String role : roleList ) {
-					splitStr =  role.split( "@" )[0];
-					if( StringUtils.equalsIgnoreCase(roleName, splitStr)) {
-						return true;
-					}
-				}
-			} else {
-				return false;
-			}
-		} catch( NullPointerException e ) {
-			return false;
-		} catch (Exception e) {
-			throw e;
-		}
-		return false;
-	}
-
-	/**
-	 * 
-	 * @param identity
-	 * @return
-	 * @throws Exception
-	 */
-	public Boolean isIdentityExsits( String identity ) throws Exception {
-		if( identity == null || identity.isEmpty() ){
-			throw new Exception( "identity is null!" );
-		}
-		Business business = null;
-		String result = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			result = business.organization().identity().get( identity );
-			if( result == null || result.isEmpty() ){
-				return false;
-			}else{
-				return true;
-			}
-		} catch ( Exception e ) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 根据用户的身份查询用户的姓名
-	 * 
-	 * @param identity
-	 * @return
-	 * @throws Exception
-	 */
-	public String getPersonNameWithIdentity( String identity ) throws Exception {
-		if (identity == null || identity.isEmpty()) {
-			throw new Exception("identity is null!");
-		}
-		Business business = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			return business.organization().person().getWithIdentity( identity );
-		} catch( NullPointerException e ) {
-			return null;
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-	
-	/**
-	 * 根据用户的标识查询用户对象
-	 * 
-	 * @param falg
-	 * @return
-	 * @throws Exception
-	 */
-	public Person getPersonWithFlag( String flag ) throws Exception {
-		if ( StringUtils.isEmpty( flag ) ) {
-			throw new Exception("flag is null!");
-		}
-		Business business = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			return business.organization().person().getObject( flag );
-		} catch( NullPointerException e ) {
-			return null;
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-
-	public Unit getUnitWIthFlag(String flag) throws Exception {
-		if ( StringUtils.isEmpty( flag ) ) {
-			throw new Exception("flag is null!");
-		}
-		Business business = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			return business.organization().unit().getObject( flag );
-		} catch( NullPointerException e ) {
-			return null;
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 获取人员所属的所有组织名称列表
-	 * @param personName
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listUnitNamesWithPerson( String personName ) throws Exception {
-		List<String> unitNames = null;
-		Business business = null;
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
-			business = new Business(emc);
-			unitNames = business.organization().unit().listWithPersonSupNested( personName );
-			return unitNames;
-		} catch( NullPointerException e ) {
-			return null;
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-	
-	/**
-	 * 根据用户姓名查询用户所有的身份信息
-	 * 
-	 * @param userName
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listIdentitiesWithPerson( String userName ) throws Exception {
-		if (userName == null || userName.isEmpty()) {
-			throw new Exception("userName is null!");
-		}
-		Business business = null;
-		try ( EntityManagerContainer emc = EntityManagerContainerFactory.instance().create() ) {
-			business = new Business(emc);
-			return business.organization().identity().listWithPerson(userName);
-		} catch( NullPointerException e ) {
-			return null;
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 列示人员所拥有的所有角色信息
-	 * @param name
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listRoleNamesByPerson( String personName ) throws Exception {
-		Business business = null;
-		List<String> roleList = null;
-		List<String> nameList = new ArrayList<String>();
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			roleList = business.organization().role().listWithPerson( personName );
-			if (roleList != null && roleList.size() > 0) {
-				roleList.stream().filter( r -> !nameList.contains( r )).distinct().forEach( r -> nameList.add( r ));
-			}
-		} catch( NullPointerException e ) {
-			return null;
-		} catch (Exception e) {
-			throw e;
-		}
-		return nameList;
-	}
-
-	/**
-	 * 列示人员所拥有的所有群组信息
-	 * @param personName
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listGroupNamesByPerson(String personName) throws Exception {
-		Business business = null;
-		List<String> groupList = null;
-		List<String> nameList = new ArrayList<String>();
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			groupList = business.organization().group().listWithPerson( personName );
-			if (groupList != null && groupList.size() > 0) {
-				groupList.stream().filter( g -> !nameList.contains( g )).distinct().forEach( g -> nameList.add( g ));
-			}
-		} catch( NullPointerException e ) {
-			return null;
-		} catch (Exception e) {
-			throw e;
-		}
-		return nameList;
-	}
-	
-	public String getPersonIdentity( String personName, String identity ) throws Exception {
-		List<String> identityNames = null;
-		String identityName = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			identityNames = listIdentitiesWithPerson( personName );
-			if( identity == null || identity.isEmpty() ) {
-				if ( identityNames.size() == 0 ) {
-					throw new Exception("perons has no identity.");
-				} else if ( identityNames.size() > 0 ) {
-					identityName = identityNames.get(0);
-				}
-			}else {
-				//判断传入的身份是否合法
-				identityName = this.findIdentity( identityNames, identity );
-				if ( null == identity || identity.isEmpty() ) {
-					throw new Exception("identity is invalid!identity:" + identity );
-				}
-			}
-		} catch (Exception e) {
-			throw e;
-		}
-		return identityName;
-	}
-	
-	private String findIdentity( List<String> identityNames, String identityName ) throws Exception {
-		if( identityName != null && !identityName.isEmpty() && !"null".equals(identityName)){
-			if( identityNames != null && !identityNames.isEmpty() ){
-				for ( String identity : identityNames ) {
-					if ( identity.equalsIgnoreCase(identityName) ) {
-						return identity;
-					}
-				}
-			}
-		}else{
-			if( identityNames != null && !identityNames.isEmpty() ){
-				return identityNames.get(0);
-			}
-		}
-		return null;
-	}
-
-	public List<String> getPersonPermissionCodes(String personName ) throws Exception {
-		List<String> queryObjectNames = new ArrayList<>();
-		List<String> groupNames = null;
-		List<String> roleNames = null;
-		List<String> unitNames = null;
-		List<String> identities = null;
-		List<String> dutyNames = null;
-		
-		//选查询个人涉及的所有组织角色以及群组编码
-		groupNames = listGroupNamesByPerson( personName );
-		roleNames = listRoleNamesByPerson( personName );
-		unitNames = listUnitNamesWithPerson( personName );
-		identities = listIdentitiesWithPerson( personName );
-		dutyNames = listAllDutyWithPerson( personName );
-		
-		queryObjectNames.add( personName );
-		
-		//将三个列表合为一个,再进行分类权限查询
-		if( identities != null && !identities.isEmpty() ) {
-			for( String identity : identities ) {
-				if( !queryObjectNames.contains( identity )) {
-					queryObjectNames.add( identity );
-				}
-			}
-		}
-		if( groupNames != null && !groupNames.isEmpty() ) {
-			for( String name : groupNames ) {
-				if( !queryObjectNames.contains( name )) {
-					queryObjectNames.add( name );
-				}
-			}
-		}
-		if( roleNames != null && !roleNames.isEmpty() ) {
-			for( String name : roleNames ) {
-				if( !queryObjectNames.contains( name )) {
-					queryObjectNames.add( name );
-				}
-			}
-		}
-		if( unitNames != null && !unitNames.isEmpty() ) {
-			for( String name : unitNames ) {
-				if( !queryObjectNames.contains( name )) {
-					queryObjectNames.add( name );
-				}
-			}
-		}
-		if( dutyNames != null && !dutyNames.isEmpty() ) {
-			for( String name : dutyNames ) {
-				if( !queryObjectNames.contains( name )) {
-					queryObjectNames.add( name );
-				}
-			}
-		}
-		return queryObjectNames;
-	}
-
-	public List<String> listIdentityWithUnitName( String unit ) throws Exception {
-		Business business = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			return business.organization().identity().listWithUnitSubNested(unit);
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 获取指定组织指定职务所涉及的身份列表
-	 * 
-	 * @param unit
-	 * @param dutyName
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listIdentityWithDutyInUnit(String unit, String dutyName) throws Exception {
-		Business business = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			return business.organization().unitDuty().listIdentityWithUnitWithName( unit, dutyName );
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 获取指定组织指定职务所涉及的身份列表
-	 * 
-	 * @param unit
-	 * @param dutyNames
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listIdentityWithDutyInUnit( String unit, String[] dutyNames ) throws Exception {
-		List<String> identities = null;
-		List<String> resultList = new ArrayList<>();
-		Business business = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			if( dutyNames != null && dutyNames.length > 0 ) {
-				for( String dutyName : dutyNames ) {
-					identities = business.organization().unitDuty().listIdentityWithUnitWithName( unit, dutyName );
-					if( identities != null && !identities.isEmpty() ) {
-						for( String identity : identities ) {
-							if( !resultList.contains( identity )) {
-								resultList.add( identity );
-							}
-						}
-					}
-				}
-			}
-			return resultList;
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-	
-	public List<String> listAllDutyWithPerson( String personName ) throws Exception {
-		List<String> identities = null;
-		List<String> dutyNames = null;
-		List<String> resultList = new ArrayList<>();
-		Business business = null;
-		try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-			business = new Business(emc);
-			identities = business.organization().identity().listWithPerson( personName );
-			if( identities != null && !identities.isEmpty() ) {
-				for( String identity : identities ) {
-					dutyNames = business.organization().unitDuty().listNameWithIdentity( identity );
-					if( dutyNames != null && !identities.isEmpty() ) {
-						for( String dutyName : dutyNames ) {
-							if( !resultList.contains( dutyName )) {
-								resultList.add( dutyName );
-							}
-						}
-					}
-				}
-			}
-			return resultList;
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-
-	/**
-	 * 判断用户是否是管理员
-	 * @param request
-	 * @param effectivePerson
-	 * @return
-	 * @throws Exception
-	 */
-	public Boolean isManager(HttpServletRequest request, EffectivePerson effectivePerson) throws Exception {
-		if( effectivePerson.isManager() ) {
-			return true;
-		}
-		if( "xadmin".equalsIgnoreCase( effectivePerson.getName() )) {
-			return true;
-		}
-		return isHasPlatformRole(effectivePerson.getDistinguishedName(), "CalendarManager");
-	}
-
-	
-}

+ 0 - 899
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/common/date/DateOperation.java

@@ -1,899 +0,0 @@
-package com.x.calendar.common.date;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.List;
-
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-
-/**
- * 
- * @包  名 :com.land.util.date
- * @文件名 :DateUtil.java
- * @作  者 :O2LEE
- * @单  位 :浙江兰德纵横网络技术有限公司
- * @日  期 :2013-06-07
- */
-public class DateOperation {
-	
-	private Logger logger = LoggerFactory.getLogger( DateOperation.class );
-	/**
-	 * 根据样式得到格式化对象SimpleDateFormat
-	 * @param date
-	 * @param style
-	 * @return
-	 */
-	public String getDate(Date date, String style) {
-		SimpleDateFormat format = new SimpleDateFormat(style);
-		return format.format(date);
-	}
-
-	/**
-	 * 得到某日期的日期部分
-	 * 
-	 * @param date
-	 * @return yyyy-MM-dd
-	 */
-	public String getDate(Date date) {
-		return format1.format(date);
-	}
-
-	/**
-	 * 得到某日期的时间部分
-	 * 
-	 * @param date
-	 * @return HH:mm:ss
-	 */
-	public  String getTime(Date date) {
-		return format2.format(date);
-	}
-
-	public  Date getDateFromString(String dateString, String style) throws Exception{
-		Date date = null;
-		if(style==null||"".equals(style.trim())){
-			date = format1.parse(dateString);
-		}else if("yyyy-MM-dd HH:mm:ss".equals(style.trim())){
-			date = format3.parse(dateString);
-		}else if("yyyy/MM/dd HH:mm:ss".equals(style.trim())){
-			date = format3_1.parse(dateString);
-		}else if("yyyy/MM/dd".equals(style.trim())){
-			date = format4.parse(dateString);
-		}else if("yyyy-MM-dd".equals(style.trim())){
-			date = format1.parse(dateString);
-		}else if("yyyyMMdd".equals(style.trim())){
-			date = format5.parse(dateString);
-		}else if("yyyyMMddHHmmss".equals(style.trim())){
-			date = format7.parse(dateString);
-		}else if("HH:mm:ss".equals(style.trim())){
-			date = format2.parse(dateString);
-		}else{
-			throw new Exception("对不起,您输入的日期style系统无法识别,请检查您的参数输入!");
-		}
-		return date;
-	}
-	
-	/**
-	 * 将字符串转换为日期格式
-	 * 会尝试多种格式转换,转换成功后返回结果
-	 * @param dateString
-	 * @return
-	 * @throws Exception
-	 */
-	public  Date getDateFromString( String dateString ) throws Exception{
-		Date date = null;
-		try{
-			date = getDateFromString( dateString, "yyyy-MM-dd HH:mm:ss" );
-			return date;
-		}catch(Exception e){}
-		
-		try{
-			date = getDateFromString( dateString, "yyyy/MM/dd HH:mm:ss" );
-			return date;
-		}catch(Exception e){}
-		
-		try{
-			date = getDateFromString( dateString, "yyyy-MM-dd" );
-			return date;
-		}catch(Exception e){}
-		
-		try{
-			date = getDateFromString( dateString, "yyyy/MM/dd" );
-			return date;
-		}catch(Exception e){}
-		
-		try{
-			date = getDateFromString( dateString, "yyyyMMdd" );
-			return date;
-		}catch(Exception e){}
-		
-		try{
-			date = getDateFromString( dateString, "yyyyMMddHHmmss" );
-			return date;
-		}catch(Exception e){}
-		
-		try{
-			date = getDateFromString( dateString, "HH:mm:ss" );
-			return date;
-		}catch(Exception e){}
-		return date;
-	}
-	
-	
-	public  String getDateFromDate(Date date, String style) throws Exception{
-		String dateString = null;
-		if(style==null||"".equals(style.trim())){
-			dateString = format1.format(date);
-		}else if("yyyy-MM-dd HH:mm:ss".equals(style.trim())){
-			dateString = format3.format(date);
-		}else if("yyyy/MM/dd HH:mm:ss".equals(style.trim())){
-			dateString = format3_1.format(date);
-		}else if("yyyy/MM/dd".equals(style.trim())){
-			dateString = format4.format(date);
-		}else if("yyyy-MM-dd".equals(style.trim())){
-			dateString = format1.format(date);
-		}else if("yyyyMMdd".equals(style.trim())){
-			dateString = format5.format(date);
-		}else if("yyyyMMddHHmmss".equals(style.trim())){
-			dateString = format7.format(date);
-		}else if("HH:mm:ss".equals(style.trim())){
-			dateString = format2.format(date);
-		}else{
-			throw new Exception("对不起,您输入的日期style系统无法识别,请检查您的参数输入!style=" + style);
-		}
-		return dateString;
-	}
-	
-	/**
-	 * 得到某日期加上或减去天数后的日期,day为负数时减去
-	 * 
-	 * @param date
-	 * @param month
-	 * @return "yyyy-MM-dd"
-	 * @throws Exception 
-	 */
-	public  String getDayAdd(String dateString, int day, String style) throws Exception {
-		Date date = getDateFromString(dateString, style);
-		return getDayAdd(date, day);
-	}
-	
-	/**
-	 * 得到某日期加上或减去天数后的日期,day为负数时减去
-	 * 
-	 * @param date
-	 * @param month
-	 * @return "yyyy-MM-dd"
-	 */
-	public  String getDayAdd(Date date, int day) {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(date);
-		calendar.add(Calendar.DATE, day);
-		return format1.format(calendar.getTime());
-	}
-	
-	/**
-	 * 得到某日期加上或减去天数后的日期,day为负数时减去
-	 * 
-	 * @param date
-	 * @param month
-	 * @return "yyyy-MM-dd"
-	 */
-	public  Date getDayAddDate(Date date, int day) {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(date);
-		calendar.add(Calendar.DATE, day);
-		return calendar.getTime();
-	}
-
-	/**
-	 * 得到某日期加上或减去月份后的日期,month为负数时减去
-	 * 
-	 * @param date
-	 * @param month
-	 * @return "yyyy-MM-dd"
-	 */
-	public String getMonthAdd(Date date, int month) {
-		return format1.format( getMonthAddDate( date, month ) );
-	}
-	
-	/**
-	 * 得到某日期加上或减去月份后的日期,month为负数时减去
-	 * 
-	 * @param date
-	 * @param month
-	 * @return "yyyy-MM-dd"
-	 */
-	public Date getMonthAddDate( Date date, int month ) {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(date);
-		calendar.add(Calendar.MONTH, month);
-		return calendar.getTime();
-	}
-	
-	/**
-	 * 得到某日期加上或减去分钟后的日期,min为负数时减去
-	 * 
-	 * @param date
-	 * @param month
-	 * @return "yyyy-MM-dd HH:mi:ss"
-	 */
-	public  String getMinutesAdd(Date date, int min) {
-		return format3.format(getMinutesAddDate( date, min ));
-	}
-	/**
-	 * 得到某日期加上或减去分钟后的日期,min为负数时减去
-	 * 
-	 * @param date
-	 * @param month
-	 * @return "yyyy-MM-dd HH:mi:ss"
-	 */
-	public  Date getMinutesAddDate(Date date, int min) {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(date);
-		calendar.add(Calendar.MINUTE, min);
-		return calendar.getTime();
-	}
-	/**
-	 * 得到某日期的日
-	 * 
-	 * @param Date
-	 *            date
-	 * @return
-	 */
-	public  String getDay(Date date) {
-		try{
-			return format10.format(date);
-		}catch(Exception e){
-			return "0";
-		}
-	}
-	public int getDayNumber(Date date) {
-		String result = null;
-		try{
-			result = format10.format(date);
-		}catch(Exception e){
-			result = "0";
-		}
-		return Integer.parseInt(result);
-	}
-	/**
-	 * 得到某日期的月份
-	 * 
-	 * @param Date
-	 *            date
-	 * @return
-	 */
-	public  String getMonth(Date date) {
-		try{
-			return format9.format(date);
-		}catch(Exception e){
-			return "0";
-		}
-	}
-	
-	/**
-	 * 得到某日期的年份-月份:yyyy-MM
-	 * 
-	 * @param Date date
-	 * @return
-	 */
-	public  String getYearAndMonth( Date date ) {
-		try{
-			return format_year_month.format(date);
-		}catch(Exception e){
-			System.out.println("date is not valid, date:" + date);
-			return null;
-		}
-	}
-	
-	public int getMonthNumber(Date date) {
-		String result = null;
-		try{
-			result = format9.format(date);
-		}catch(Exception e){
-			result = "0";
-		}
-		return Integer.parseInt(result);
-	}
-
-	/**
-	 * 得到某日期的年份
-	 * 
-	 * @param Date
-	 *            date
-	 * @return
-	 */
-	public  String getYear(Date date) {
-		try{
-			return format8.format(date);
-		}catch(Exception e){
-			return "0";
-		}
-	}
-	public int getYearNumber(Date date) {
-		String result = null;
-		try{
-			result = format8.format(date);
-		}catch(Exception e){
-			result = "0";
-		}
-		return Integer.parseInt(result);
-	}
-	/**
-	 * 得到某日期的小时
-	 * 
-	 * @param Date
-	 *            date
-	 * @return
-	 */
-	public  String getHour(Date date) {
-		try{
-			return format11.format(date);
-		}catch(Exception e){
-			return "0";
-		}
-	}
-	/**
-	 * 得到某日期的分钟
-	 * 
-	 * @param Date
-	 *            date
-	 * @return
-	 */
-	public  String getMinites(Date date) {
-		return format12.format(date);
-	}
-	/**
-	 * 得到某日期的秒
-	 * 
-	 * @param Date
-	 *            date
-	 * @return
-	 */
-	public  String getSeconds(Date date) {
-		return format13.format(date);
-	}
-	/**
-	 * 得到某年有多少天
-	 * 
-	 * @param String
-	 *            date "yyyy-MM-dd"
-	 * @return
-	 * @throws ParseException
-	 */
-	@SuppressWarnings("static-access")
-	public  int getDaysForYear(String date) throws ParseException {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(format1.parse(date));
-		return calendar.get(calendar.DAY_OF_YEAR);
-	}
-
-	/**
-	 * 得到某年有多少天
-	 * 
-	 * @param Date
-	 *            date
-	 * @return
-	 * @throws ParseException
-	 */
-	@SuppressWarnings("static-access")
-	public  int getDaysForYear(Date date) throws ParseException {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(date);
-		return calendar.get(calendar.DAY_OF_YEAR);
-	}
-
-	/**
-	 * 得到某年有多少天
-	 * 
-	 * @param String
-	 *            year "yyyy"
-	 * @return
-	 * @throws ParseException
-	 */
-	@SuppressWarnings("static-access")
-	public  int getDaysForYear_YYYY(String year) throws ParseException {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(format8.parse(year));
-		return calendar.get(calendar.DAY_OF_YEAR);
-	}
-
-	/**
-	 * 得到某月有多少天
-	 * 
-	 * @param String
-	 *            date "yyyy-MM-dd"
-	 * @return
-	 * @throws ParseException
-	 */
-	@SuppressWarnings("static-access")
-	public  int getDaysForMonth(String date) throws ParseException {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(format1.parse(date));
-		return calendar.get(calendar.DAY_OF_MONTH);
-	}
-
-	/**
-	 * 得到某月有多少天
-	 * 
-	 * @param String
-	 *            date "yyyy-MM"
-	 * @return
-	 * @throws ParseException
-	 */
-	@SuppressWarnings("static-access")
-	public  int getDaysForMonth_MM(String date) throws ParseException {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(format14.parse(date));
-		return calendar.get(calendar.DAY_OF_MONTH);
-	}
-
-	/**
-	 * 得到某月有多少天
-	 * 
-	 * @param Date
-	 *            date
-	 * @return
-	 * @throws ParseException
-	 */
-	public  int getDaysForMonth(Date date) throws ParseException {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(date);
-		return calendar.get(Calendar.DAY_OF_MONTH);
-	}
-	
-	public int getMaxDayByYearMonth(int year, int month) {
-		  Calendar calendar = Calendar.getInstance();
-		  calendar.set(Calendar.YEAR, year );
-		  calendar.set(Calendar.MONTH, month -1 );
-		  return calendar.getActualMaximum(Calendar.DATE);
-	}
-
-	/**
-	 * 得到当前的日期
-	 * 
-	 * @return
-	 */
-	public  String getNowDate() {
-		return format1.format(new Date());
-	}
-
-	/**
-	 * 得到当前的时间
-	 * 
-	 * @return
-	 */
-	public  String getNowTime() {
-		return format2.format(new Date());
-	}
-	/**
-	 * 得到当前的时间
-	 * yyyyMMddHHmmss
-	 * @return
-	 */
-	public  String getNowTimeChar() {
-		return format7.format(new Date());
-	}
-	/**
-	 * 得到当前的时间
-	 * yyyy-MM-dd HH:mm:ss
-	 * @return
-	 */
-	public  String getNowDateTime() {
-		return format3.format(new Date());
-	}
-	/**
-	 * 得到两个时间之前的分差
-	 * @param date1 yyyy-MM-dd HH:mm:ss
-	 * @param date2 yyyy-MM-dd HH:mm:ss
-	 * @return
-	 */
-	public  long getDeff(String date1,String date2) {
-		long dayNumber = 0;
-		// 1小时=60分钟=3600秒=3600000
-		long mins = 60L * 1000L;
-		// long day= 24L * 60L * 60L * 1000L;计算天数之差
-		SimpleDateFormat df = null;
-		if(date1.length() == 19){
-			df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-		}else if(date1.length() == 10){
-			df = new SimpleDateFormat("yyyy-MM-dd");
-		}else if(date1.length() == 8){
-			df = new SimpleDateFormat("HH:mm:ss");
-		}else{
-			df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-		}
-		try {
-			java.util.Date d1 = df.parse(date1);
-			java.util.Date d2 = df.parse(date2);
-			dayNumber = (d2.getTime() - d1.getTime()) / mins;
-		} catch (Exception e) {
-			logger.warn( "系统获取得到两个时间之前的分差发生异常");
-			logger.error(e);
-		}
-		return dayNumber;
-	}
-	/**
-	 * 得到两个时间之前的分差
-	 * @param date1 yyyy-MM-dd HH:mm:ss
-	 * @param date2 yyyy-MM-dd HH:mm:ss
-	 * @return
-	 */
-	public long getDeff(Date date1,Date date2) {
-		long dayNumber = 0;
-		// 1小时=60分钟=3600秒=3600000
-		long mins = 60L * 1000L;
-		// long day= 24L * 60L * 60L * 1000L;计算天数之差
-		try {
-			dayNumber = (date2.getTime() - date1.getTime()) / mins;
-		} catch (Exception e) {
-			logger.warn( "系统获取得到两个时间之前的分差发生异常" );
-			logger.error(e);
-		}
-		return dayNumber;
-	}
-	/**
-	 * 
-	 * 日期格式转换
-	 * 从YYYY-MM-DD转换到YYYYMMDD
-	 * @param date
-	 * @throws ParseException 
-	 */
-	public  String changeDateFormat(String dateString){
-		Date date;
-		String reslut = null;
-		try {
-			if("".equals(dateString)){
-				dateString="0000-00-00";
-			}
-			date = format1.parse(dateString);
-			reslut = format5.format(date);
-		} catch (ParseException e) {
-			try {
-				date = format1.parse("0000-00-00");
-			} catch (ParseException e1) {
-				logger.warn( "系统日期格式转换发生异常");
-				logger.error(e);
-			}
-			logger.warn( "系统日期格式转换发生异常");
-			logger.error(e);
-		}
-		
-		return reslut;
-	}
-	
-	/** 格式 yyyy-MM-dd */
-	public  final SimpleDateFormat format_year_month = new SimpleDateFormat("yyyy-MM");
-	/** 格式 yyyy-MM-dd */
-	public  final SimpleDateFormat format1 = new SimpleDateFormat("yyyy-MM-dd");
-	/** 格式 HH:mm:ss */
-	public  final SimpleDateFormat format2 = new SimpleDateFormat("HH:mm:ss");
-	/** 格式 yyyy-MM-dd HH:mm:ss */
-	public  final SimpleDateFormat format3 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-	public  final SimpleDateFormat format3_1 = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
-	/** 格式 yyyy/MM/dd */
-	public  final SimpleDateFormat format4 = new SimpleDateFormat("yyyy/MM/dd");
-	/** 格式 yyyyMMdd */
-	public  final SimpleDateFormat format5 = new SimpleDateFormat("yyyyMMdd");
-	/** 格式 HHmmss */
-	public  final SimpleDateFormat format6 = new SimpleDateFormat("HHmmss");
-	/** 格式 yyyyMMddHHmmss */
-	public  final SimpleDateFormat format7 = new SimpleDateFormat("yyyyMMddHHmmss");
-	/** 格式 yyyy */
-	public  final SimpleDateFormat format8 = new SimpleDateFormat("yyyy");
-	/** 格式 MM */
-	public  final SimpleDateFormat format9 = new SimpleDateFormat("MM");
-	/** 格式 dd */
-	public  final SimpleDateFormat format10 = new SimpleDateFormat("dd");
-	/** 格式 HH */
-	public  final SimpleDateFormat format11 = new SimpleDateFormat("HH");
-	/** 格式 mm */
-	public  final SimpleDateFormat format12 = new SimpleDateFormat("mm");
-	/** 格式 ss */
-	public  final SimpleDateFormat format13 = new SimpleDateFormat("ss");
-	/** 格式 ss */
-	public  final SimpleDateFormat format14 = new SimpleDateFormat("yyyy-MM");
-	
-	
-	public  String getStartOfWeek(String dateString){
-		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
-		try {
-			Date date = format.parse(dateString);
-			Calendar cal = Calendar.getInstance();
-			cal.setTime(date);
-			cal.setFirstDayOfWeek(Calendar.MONDAY);
-			int tmp = cal.get(Calendar.DAY_OF_WEEK) - 1;
-			if (0 == tmp) {
-				tmp = 7;
-			}
-			cal.add(Calendar.DATE, -(tmp-1));
-			return getDateFromDate(cal.getTime(), "yyyy-MM-dd") + " 00:00:00";
-		} catch (ParseException e) {
-			logger.warn( "系统getStartOfWeek日期格式转换发生异常");
-			logger.error(e);
-		} catch (Exception e) {
-			logger.warn( "系统getStartOfWeek发生异常");
-			logger.error(e);
-		}
-		return null;
-	}
-	
-	public  String getEndOfWeek(String dateString){
-		try {
-			Date date = getDateFromString(getStartOfWeek(dateString), "yyyy-MM-dd HH:mm:ss");
-			Calendar cal = Calendar.getInstance();
-			cal.setTime(date);
-			cal.setFirstDayOfWeek(Calendar.MONDAY);
-			cal.add(Calendar.DATE, 6);
-			return getDateFromDate(cal.getTime(), "yyyy-MM-dd") + " 23:59:59";
-		} catch (ParseException e) {
-			logger.warn( "系统getEndOfWeek日期格式转换发生异常");
-			logger.error(e);
-		} catch (Exception e) {
-			logger.warn( "系统getEndOfWeek发生异常");
-			logger.error(e);
-		}
-		return null;
-	}
-	
-	
-	
-	/**
-	 * 将时间格式转换为 **月**日**时**分的格式
-	 * @param dateString
-	 * @param style
-	 * @return
-	 * @throws Exception
-	 */
-	public String getDateCNString( String dateString, String style ) throws Exception{
-		StringBuffer ch_date_string = new StringBuffer();
-		Date _date = null;
-		try{
-			_date = getDateFromString( dateString, style );
-		}catch(Exception e){
-			logger.warn( "系统getDateCNString日期格式转换发生异常");
-			logger.error(e);
-		}
-		if(_date == null ){
-			_date = new Date();
-		}
-		String year = getYear( _date );
-		String month = getMonth( _date );
-		String day = getDay( _date );
-		String hour = getHour( _date );
-		String min = getMinites( _date );
-		ch_date_string.append( year );
-		ch_date_string.append( "年" );
-		ch_date_string.append( month );
-		ch_date_string.append( "月" );
-		ch_date_string.append( day );
-		ch_date_string.append( "日" );
-		ch_date_string.append( hour );
-		ch_date_string.append( "时" );
-		ch_date_string.append( min );
-		ch_date_string.append( "分" );		
-		return ch_date_string.toString();
-	}
-	
-	/**
-	 * 将时间格式转换为 **月**日**时**分**秒 的格式
-	 * @param dateString
-	 * @param style
-	 * @return
-	 * @throws Exception
-	 */
-	public String getDateCNString2( String dateString, String style ) throws Exception{
-		StringBuffer ch_date_string = new StringBuffer();
-		Date _date = null;
-		try{
-			_date = getDateFromString( dateString, style );
-		}catch(Exception e){
-			logger.warn( "系统getDateCNString2日期格式转换发生异常");
-			logger.error(e);
-		}
-		if(_date == null ){
-			_date = new Date();
-		}
-		String year = getYear( _date );
-		String month = getMonth( _date );
-		String day = getDay( _date );
-		String hour = getHour( _date );
-		String min = getMinites( _date );
-		String sec = getSeconds( _date );
-		ch_date_string.append( year );
-		ch_date_string.append( "年" );
-		ch_date_string.append( month );
-		ch_date_string.append( "月" );
-		ch_date_string.append( day );
-		ch_date_string.append( "日" );
-		ch_date_string.append( hour );
-		ch_date_string.append( "时" );
-		ch_date_string.append( min );
-		ch_date_string.append( "分" );
-		ch_date_string.append( sec );
-		ch_date_string.append( "秒" );
-		return ch_date_string.toString();
-	}
-	
-	/**
-	 * 获取日期在一年中的周数
-	 * 结果从1开始
-	 * @param dateString yyyy-mm-dd
-	 * @return
-	 */
-	public  int getWeekNumOfYear( String dateString ){
-		try {
-			Date date = getDateFromString( dateString , "yyyy-MM-dd");
-			Calendar cal = Calendar.getInstance();
-			cal.setTime(date);
-			cal.setFirstDayOfWeek(2);//设置每周的第一天是星期一
-	        //月份有问题(这里的月份开始计数为0)
-	        //本年的第几天,在计算时间间隔的时候有用
-	        //System.out.println("一年中的天数:" + cal.get(Calendar.DAY_OF_YEAR));
-	        //System.out.println("一年中的周数:" + cal.get(Calendar.WEEK_OF_YEAR));
-	        //即本月的第几周
-	        //System.out.println("一月中的周数:" + cal.get(Calendar.WEEK_OF_MONTH));
-	        //即一周中的第几天(这里是以周日为第一天的)
-	        //System.out.println("一周中的天数:" + cal.get(Calendar.DAY_OF_WEEK));
-			return cal.get(Calendar.WEEK_OF_YEAR);
-		} catch (ParseException e) {
-			logger.warn( "系统getWeekNumOfYear日期格式转换发生异常");
-			logger.error(e);
-		} catch (Exception e) {
-			logger.warn( "系统getWeekNumOfYear发生异常");
-			logger.error(e);
-		}
-		return -1;
-	}
-
-	public Date getFirstDayInMonth( Date date ) {
-		int year = getYearNumber( date );
-		int month = getMonthNumber( date );
-		Calendar cal = Calendar.getInstance();
-		cal.set( year, month - 1, 1 );
-		return cal.getTime();
-	}
-	
-	public Date getEndDayInMonth( Date date ) {
-		int year = getYearNumber( date );
-		int month = getMonthNumber( date );
-		Calendar cal = Calendar.getInstance();
-		cal.set( year, month, 1 );
-		cal.add(Calendar.DATE, -1); 
-		cal.set( cal.get(Calendar.YEAR), 
-				cal.get(Calendar.MONTH), 
-				cal.get(Calendar.DATE), 
-				23, 
-				59, 
-				59
-			);
-		return cal.getTime();
-	}
-
-	/**
-	 * 计算两个日期或者时间之间的月份列表:yyyy-MM
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	public List<String> listMonthsBetweenDate(Date minTime, Date maxTime) {		
-		if( maxTime == null ) {
-			maxTime = new Date();
-		}
-		ArrayList<String> result = new ArrayList<String>();  
-	    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");//格式化为年月  
-		Calendar min = Calendar.getInstance();  
-	    Calendar max = Calendar.getInstance();
-	    
-	    min.setTime(minTime);  
-	    min.set(min.get(Calendar.YEAR), min.get(Calendar.MONTH), 1); 
-	   
-	    max.setTime(maxTime);  
-	    max.set(max.get(Calendar.YEAR), max.get(Calendar.MONTH), 2); 
-
-	    result = addMonthToStrList( sdf.format(minTime), result );
-	    result = addMonthToStrList( sdf.format(maxTime), result );
-	    Calendar curr = min;  
-	    while (curr.before(max)) {
-	    	result = addMonthToStrList( sdf.format(curr.getTime()), result );
-	    	curr.add(Calendar.MONTH, 1);  
-	    }  
-		return result;
-	}
-
-	private ArrayList<String> addMonthToStrList(String monthString, ArrayList<String> result) {
-		if( result == null ) {
-			result = new ArrayList<>();
-		}
-		if( !result.contains( monthString )) {
-			result.add(monthString);
-		}
-		return result;
-	}
-
-	/**
-	 * 根据时间获取当天的开始时间 yyyy-MM-dd 00:00:00
-	 * @param startTime
-	 * @return
-	 * @throws Exception 
-	 */
-	public Date getBeginTimeInDay(Date startTime) throws Exception {
-		if( startTime == null ) {
-			startTime = new Date();
-		}
-		return getDateFromString(format1.format( startTime ) + " 00:00:00");
-	}
-	
-	/**
-	 * 根据时间获取当天的开始时间 yyyy-MM-dd 00:00:00
-	 * @param startTime
-	 * @return
-	 * @throws Exception 
-	 */
-	public Date getEndTimeInDay(Date endTime) throws Exception {
-		if( endTime == null ) {
-			endTime = new Date();
-		}
-		return getDateFromString(format1.format( endTime ) + " 23:59:59");
-	}
-
-	/**
-	 * 计算两个时间之间涉及的日期列表
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	public List<String> listDaysBetweenDate(Date startTime, Date endTime) {
-		if( endTime == null ) {
-			endTime = new Date();
-		}
-		ArrayList<String> result = new ArrayList<String>();  
-	    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");//格式化为年月日
-		Calendar min = Calendar.getInstance();  
-	    Calendar max = Calendar.getInstance();
-	    
-	    min.setTime(startTime);  
-	    min.set(min.get(Calendar.YEAR), min.get(Calendar.MONTH), min.get( Calendar.DATE) ); 
-	   
-	    max.setTime(endTime);  
-	    max.set(max.get(Calendar.YEAR), max.get(Calendar.MONTH), max.get( Calendar.DATE)); 
-
-	    result = addMonthToStrList( sdf.format(startTime), result );
-	    result = addMonthToStrList( sdf.format(endTime), result );
-	    Calendar curr = min;  
-	    while (curr.before(max)) {
-	    	result = addMonthToStrList( sdf.format(curr.getTime()), result );
-	    	curr.add(Calendar.DATE, 1);  
-	    }  
-		return result;
-	}
-
-	/**
-	 * 根据开始时间,和需要变动的时间来生成一个新的时间
-	 * @param startTime
-	 * @param day
-	 * @param hour
-	 * @param min
-	 * @param sec
-	 * @return
-	 */
-	public Date caculateNewDate(Date startTime, int day, int hour, int min, int sec) {
-		Calendar cal = Calendar.getInstance();
-		cal.setTime( startTime );
-		cal.add( Calendar.DATE, day );
-		cal.add( Calendar.HOUR, hour );
-		cal.add( Calendar.MINUTE, min );
-		cal.add( Calendar.SECOND, sec );
-		return cal.getTime();
-	}
-	
-
-	public static void main(String[] args) throws Exception{
-		DateOperation dateOperation = new DateOperation();
-		Date time = dateOperation.caculateNewDate(dateOperation.getDateFromString("2018-05-19 08:00:00"), 0,0,-15,0);
-		System.out.println( time ); 
-	}
-}

+ 0 - 278
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/common/excel/reader/Excel2003Reader.java

@@ -1,278 +0,0 @@
-package com.x.calendar.common.excel.reader;
-
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.poi.hssf.eventusermodel.EventWorkbookBuilder.SheetRecordCollectingListener;
-import org.apache.poi.hssf.eventusermodel.FormatTrackingHSSFListener;
-import org.apache.poi.hssf.eventusermodel.HSSFEventFactory;
-import org.apache.poi.hssf.eventusermodel.HSSFListener;
-import org.apache.poi.hssf.eventusermodel.HSSFRequest;
-import org.apache.poi.hssf.eventusermodel.MissingRecordAwareHSSFListener;
-import org.apache.poi.hssf.eventusermodel.dummyrecord.LastCellOfRowDummyRecord;
-import org.apache.poi.hssf.eventusermodel.dummyrecord.MissingCellDummyRecord;
-import org.apache.poi.hssf.model.HSSFFormulaParser;
-import org.apache.poi.hssf.record.BOFRecord;
-import org.apache.poi.hssf.record.BlankRecord;
-import org.apache.poi.hssf.record.BoolErrRecord;
-import org.apache.poi.hssf.record.BoundSheetRecord;
-import org.apache.poi.hssf.record.FormulaRecord;
-import org.apache.poi.hssf.record.LabelRecord;
-import org.apache.poi.hssf.record.LabelSSTRecord;
-import org.apache.poi.hssf.record.NumberRecord;
-import org.apache.poi.hssf.record.Record;
-import org.apache.poi.hssf.record.SSTRecord;
-import org.apache.poi.hssf.record.StringRecord;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
-import org.apache.poi.poifs.filesystem.POIFSFileSystem;
-
-/**
- * 抽象Excel2003读取器,通过实现HSSFListener监听器,采用事件驱动模式解析excel2003
- * 中的内容,遇到特定事件才会触发,大大减少了内存的使用。
- *
- */
-public  class Excel2003Reader implements HSSFListener{
-	private int minColumns = -1;
-	private POIFSFileSystem fs;
-	private int lastRowNumber;
-	private int lastColumnNumber;
-
-	/** Should we output the formula, or the value it has? */
-	private boolean outputFormulaValues = true;
-
-	/** For parsing Formulas */
-	private SheetRecordCollectingListener workbookBuildingListener;
-	//excel2003工作薄
-	private HSSFWorkbook stubWorkbook;
-
-	// Records we pick up as we process
-	private SSTRecord sstRecord;
-	private FormatTrackingHSSFListener formatListener;
-
-	//表索引
-	private int sheetIndex = -1;
-	private BoundSheetRecord[] orderedBSRs;
-	@SuppressWarnings("rawtypes")
-	private ArrayList boundSheetRecords = new ArrayList();
-
-	// For handling formulas with string results
-	private int nextRow;
-	private int nextColumn;
-	private boolean outputNextStringRecord;
-	//当前行
-	private int curRow = 0;
-	//存储行记录的容器
-	private List<String> rowlist = new ArrayList<String>();;
-	@SuppressWarnings( "unused" )
-	private String sheetName;
-	
-	private String fileKey;
-	private int startRow;
-	private IRowReader rowReader;
-
-	
-	public void setRowReader(IRowReader rowReader, String fileKey, int startRow ){
-		this.rowReader = rowReader;
-		this.fileKey = fileKey;
-		this.startRow = startRow;
-	}
-	
-	/**
-	 * 遍历excel下所有的sheet
-	 * @param fileKey 
-	 * @throws IOException
-	 */
-	public void process( String fileName ) throws IOException {
-		
-		this.fs = new POIFSFileSystem( new FileInputStream(fileName) );
-		MissingRecordAwareHSSFListener listener = new MissingRecordAwareHSSFListener( this);
-		formatListener = new FormatTrackingHSSFListener(listener);
-		HSSFEventFactory factory = new HSSFEventFactory();
-		HSSFRequest request = new HSSFRequest();
-		if ( outputFormulaValues ) {
-			request.addListenerForAllRecords( formatListener );
-		} else {
-			workbookBuildingListener = new SheetRecordCollectingListener( formatListener);
-			request.addListenerForAllRecords(workbookBuildingListener);
-		}
-		factory.processWorkbookEvents(request, fs);
-		//数据读取完成
-		
-	}
-	
-	/**
-	 * 遍历excel下所有的sheet
-	 * @param fileKey 
-	 * @throws IOException
-	 */
-	public void process( InputStream is ) throws IOException {
-		this.fs = new POIFSFileSystem( is );
-		MissingRecordAwareHSSFListener listener = new MissingRecordAwareHSSFListener( this);
-		formatListener = new FormatTrackingHSSFListener(listener);
-		HSSFEventFactory factory = new HSSFEventFactory();
-		HSSFRequest request = new HSSFRequest();
-		if ( outputFormulaValues ) {
-			request.addListenerForAllRecords( formatListener );
-		} else {
-			workbookBuildingListener = new SheetRecordCollectingListener( formatListener);
-			request.addListenerForAllRecords(workbookBuildingListener);
-		}
-		factory.processWorkbookEvents(request, fs);
-		//数据读取完成
-		
-	}
-	
-	/**
-	 * HSSFListener 监听方法,处理 Record
-	 */
-	@SuppressWarnings( "unchecked" )
-	public void processRecord(Record record) {
-		int thisRow = -1;
-		int thisColumn = -1;
-		String thisStr = null;
-		String value = null;
-		switch (record.getSid()) {
-			case BoundSheetRecord.sid:
-				boundSheetRecords.add(record);
-				break;
-			case BOFRecord.sid:
-				BOFRecord br = (BOFRecord) record;
-				if (br.getType() == BOFRecord.TYPE_WORKSHEET) {
-					// 如果有需要,则建立子工作薄
-					if (workbookBuildingListener != null && stubWorkbook == null) {
-						stubWorkbook = workbookBuildingListener
-								.getStubHSSFWorkbook();
-					}
-					
-					sheetIndex++;
-					if (orderedBSRs == null) {
-						orderedBSRs = BoundSheetRecord
-								.orderByBofPosition(boundSheetRecords);
-					}
-					sheetName = orderedBSRs[sheetIndex].getSheetname();
-				}
-				break;
-	
-			case SSTRecord.sid:
-				sstRecord = (SSTRecord) record;
-				break;
-	
-			case BlankRecord.sid:
-				BlankRecord brec = (BlankRecord) record;
-				thisRow = brec.getRow();
-				thisColumn = brec.getColumn();
-				thisStr = "";
-				rowlist.add(thisColumn, thisStr);
-				break;
-			case BoolErrRecord.sid: //单元格为布尔类型
-				BoolErrRecord berec = (BoolErrRecord) record;
-				thisRow = berec.getRow();
-				thisColumn = berec.getColumn();
-				thisStr = berec.getBooleanValue()+"";
-				rowlist.add(thisColumn, thisStr);
-				break;
-	
-			case FormulaRecord.sid: //单元格为公式类型
-				FormulaRecord frec = (FormulaRecord) record;
-				thisRow = frec.getRow();
-				thisColumn = frec.getColumn();
-				if (outputFormulaValues) {
-					if (Double.isNaN(frec.getValue())) {
-						// Formula result is a string
-						// This is stored in the next record
-						outputNextStringRecord = true;
-						nextRow = frec.getRow();
-						nextColumn = frec.getColumn();
-					} else {
-						thisStr = formatListener.formatNumberDateCell(frec);
-					}
-				} else {
-					thisStr = '"' + HSSFFormulaParser.toFormulaString(stubWorkbook, frec.getParsedExpression()) + '"';
-				}
-				rowlist.add(thisColumn,thisStr);
-				break;
-			case StringRecord.sid://单元格中公式的字符串
-				if (outputNextStringRecord) {
-					// String for formula
-					StringRecord srec = (StringRecord) record;
-					thisStr = srec.getString();
-					thisRow = nextRow;
-					thisColumn = nextColumn;
-					outputNextStringRecord = false;
-				}
-				break;
-			case LabelRecord.sid:
-				LabelRecord lrec = (LabelRecord) record;
-				curRow = thisRow = lrec.getRow();
-				thisColumn = lrec.getColumn();
-				value = lrec.getValue().trim();
-				value = value.equals( "" )?" ":value;
-				this.rowlist.add(thisColumn, value);
-				break;
-			case LabelSSTRecord.sid:  //单元格为字符串类型
-				LabelSSTRecord lsrec = (LabelSSTRecord) record;
-				curRow = thisRow = lsrec.getRow();
-				thisColumn = lsrec.getColumn();
-				if (sstRecord == null) {
-					rowlist.add(thisColumn, " " );
-				} else {
-					value =  sstRecord
-					.getString(lsrec.getSSTIndex()).toString().trim();
-					value = value.equals( "" )?" ":value;
-					rowlist.add(thisColumn,value);
-				}
-				break;
-			case NumberRecord.sid:  //单元格为数字类型
-				NumberRecord numrec = (NumberRecord) record;
-				curRow = thisRow = numrec.getRow();
-				thisColumn = numrec.getColumn();
-				value = formatListener.formatNumberDateCell(numrec).trim();
-				value = value.equals( "" )?" ":value;
-				// 向容器加入列值
-				rowlist.add(thisColumn, value);
-				break;
-			default:
-				break;
-		}
-
-		// 遇到新行的操作
-		if (thisRow != -1 && thisRow != lastRowNumber) {
-			lastColumnNumber = -1;
-		}
-
-		// 空值的操作
-		if (record instanceof MissingCellDummyRecord) {
-			MissingCellDummyRecord mc = (MissingCellDummyRecord) record;
-			curRow = thisRow = mc.getRow();
-			thisColumn = mc.getColumn();
-			rowlist.add(thisColumn," " );
-		}
-
-		// 更新行和列的值
-		if (thisRow > -1)
-			lastRowNumber = thisRow;
-		if (thisColumn > -1)
-			lastColumnNumber = thisColumn;
-
-		// 行结束时的操作
-		if (record instanceof LastCellOfRowDummyRecord) {
-			if (minColumns > 0) {
-				// 列值重新置空
-				if (lastColumnNumber == -1) {
-					lastColumnNumber = 0;
-				}
-			}
-			lastColumnNumber = -1;
-			// 每行结束时, 调用getRows() 方法
-			
-			rowReader.getRows(sheetIndex,curRow, rowlist, this.fileKey, this.startRow );
-			
-			// 清空容器
-			rowlist.clear();
-		}
-	}
-	
-}

+ 0 - 232
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/common/excel/reader/Excel2007Reader.java

@@ -1,232 +0,0 @@
-package com.x.calendar.common.excel.reader;
-
-import java.io.InputStream;
-import java.math.BigDecimal;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.poi.hssf.usermodel.HSSFDateUtil;
-import org.apache.poi.openxml4j.opc.OPCPackage;
-import org.apache.poi.xssf.eventusermodel.XSSFReader;
-import org.apache.poi.xssf.model.SharedStringsTable;
-import org.apache.poi.xssf.usermodel.XSSFRichTextString;
-import org.xml.sax.Attributes;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.helpers.XMLReaderFactory;
-
-/**
- * 抽象Excel2007读取器,excel2007的底层数据结构是xml文件,采用SAX的事件驱动的方法解析
- * xml,需要继承DefaultHandler,在遇到文件内容时,事件会触发,这种做法可以大大降低
- * 内存的耗费,特别使用于大数据量的文件。
- *
- */
-public class Excel2007Reader extends DefaultHandler {
-	//共享字符串表
-	private SharedStringsTable sst;
-	//上一次的内容
-	private String lastContents;
-	
-	private boolean nextIsString;
-
-	private int sheetIndex = -1;
-	
-	private List<String> rowlist = new ArrayList<String>();
-	//当前行
-	private int curRow = 0;
-	//当前列
-	private int curCol = 0;
-	//日期标志
-	private boolean dateFlag;
-	//数字标志
-	private boolean numberFlag;
-	
-	private boolean isTElement;
-	
-	private String fileKey;
-	private int startRow;
-	private IRowReader rowReader;
-	
-	public void setRowReader(IRowReader rowReader, String fileKey, int startRow){
-		this.rowReader = rowReader;
-		this.fileKey = fileKey;
-		this.startRow = startRow;
-	}
-	
-	/**只遍历一个电子表格,其中sheetId为要遍历的sheet索引,从1开始,1-3
-	 * @param filename
-	 * @param sheetId
-	 * @throws Exception
-	 */
-	public void processOneSheet(String filename,int sheetId) throws Exception {
-		OPCPackage pkg = OPCPackage.open(filename);
-		XSSFReader r = new XSSFReader(pkg);
-		SharedStringsTable sst = r.getSharedStringsTable();
-		XMLReader parser = fetchSheetParser(sst);
-		
-		// 根据 rId# 或 rSheet# 查找sheet
-		InputStream sheet2 = r.getSheet( "rId"+sheetId);
-		sheetIndex++;
-		InputSource sheetSource = new InputSource(sheet2);
-		parser.parse(sheetSource);
-		sheet2.close();
-	}
-
-	/**
-	 * 遍历工作簿中所有的电子表格
-	 * @param filename
-	 * @param fileKey 
-	 * @throws Exception
-	 */
-	public void process( String filename ) throws Exception {
-		OPCPackage pkg = OPCPackage.open( filename );
-		XSSFReader r = new XSSFReader(pkg);
-		SharedStringsTable sst = r.getSharedStringsTable();
-		XMLReader parser = fetchSheetParser(sst);
-		Iterator<InputStream> sheets = r.getSheetsData();
-		while (sheets.hasNext()) {
-			curRow = 0;
-			sheetIndex++;
-			InputStream sheet = sheets.next();
-			InputSource sheetSource = new InputSource(sheet);
-			parser.parse( sheetSource );
-			sheet.close();
-		}
-		//数据读取完成
-	}
-	/**
-	 * 遍历工作簿中所有的电子表格
-	 * @param is
-	 * @param fileKey 
-	 * @throws Exception
-	 */
-	public void process( InputStream is ) throws Exception {
-		OPCPackage pkg = OPCPackage.open( is );
-		XSSFReader r = new XSSFReader(pkg);
-		SharedStringsTable sst = r.getSharedStringsTable();
-		XMLReader parser = fetchSheetParser(sst);
-		Iterator<InputStream> sheets = r.getSheetsData();
-		while (sheets.hasNext()) {
-			curRow = 0;
-			sheetIndex++;
-			InputStream sheet = sheets.next();
-			InputSource sheetSource = new InputSource(sheet);
-			parser.parse( sheetSource );
-			sheet.close();
-		}
-		//数据读取完成
-	}
-	public XMLReader fetchSheetParser(SharedStringsTable sst) throws SAXException {
-		XMLReader parser = XMLReaderFactory.createXMLReader( "org.apache.xerces.parsers.SAXParser" );
-		this.sst = sst;
-		parser.setContentHandler(this);
-		return parser;
-	}
-
-	public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException {
-		
-		// c => 单元格
-		if ( "c".equals(name)) {
-			// 如果下一个元素是 SST 的索引,则将nextIsString标记为true
-			String cellType = attributes.getValue( "t" );
-			if ( "s".equals(cellType)) {
-				nextIsString = true;
-			} else {
-				nextIsString = false;
-			}
-			//日期格式
-			String cellDateType = attributes.getValue( "s" );
-			if ( "1".equals(cellDateType)){
-				dateFlag = true;
-			} else {
-				dateFlag = false;
-			}
-			String cellNumberType = attributes.getValue( "s" );
-			if( "2".equals(cellNumberType)){
-				numberFlag = true;
-			} else {
-				numberFlag = false;
-			}
-			
-		}
-		//当元素为t时
-		if( "t".equals(name)){
-			isTElement = true;
-		} else {
-			isTElement = false;
-		}
-		
-		// 置空
-		lastContents = "";
-	}
-
-	public void endElement(String uri, String localName, String name)
-			throws SAXException {
-		
-		// 根据SST的索引值的到单元格的真正要存储的字符串
-		// 这时characters()方法可能会被调用多次
-		if (nextIsString) {
-			try {
-				int idx = Integer.parseInt(lastContents);
-				lastContents = new XSSFRichTextString(sst.getEntryAt(idx))
-						.toString();
-			} catch (Exception e) {
-
-			}
-		} 
-		//t元素也包含字符串
-		if(isTElement){
-			String value = lastContents.trim();
-			rowlist.add(curCol, value);
-			curCol++;
-			isTElement = false;
-			// v => 单元格的值,如果单元格是字符串则v标签的值为该字符串在SST中的索引
-			// 将单元格内容加入rowlist中,在这之前先去掉字符串前后的空白符
-		} else if ( "v".equals(name)) {
-			String value = lastContents.trim();
-			value = value.equals( "" )?" ":value;
-			//日期格式处理
-			if(dateFlag){
-				try{
-					Date date = HSSFDateUtil.getJavaDate(Double.valueOf(value));
-					SimpleDateFormat dateFormat = new SimpleDateFormat( "dd/MM/yyyy" );
-					value = dateFormat.format(date);
-				}catch(Exception e){
-					
-				}
-			} 
-			//数字类型处理
-			if(numberFlag){
-				try{
-					BigDecimal bd = new BigDecimal(value);
-					value = bd.setScale(3,BigDecimal.ROUND_UP).toString();
-				}catch(Exception e){
-					
-				}
-			}
-			rowlist.add(curCol, value);
-			curCol++;
-		}else {
-			//如果标签名称为 row ,这说明已到行尾,调用 optRows() 方法
-			if (name.equals( "row" )) {
-				
-				rowReader.getRows(sheetIndex,curRow,rowlist, this.fileKey, this.startRow );
-				rowlist.clear();
-				curRow++;
-				curCol = 0;
-			}
-		}
-		
-	}
-
-	public void characters(char[] ch, int start, int length)
-			throws SAXException {
-		//得到单元格内容的值
-		lastContents += new String(ch, start, length);
-	}
-}

+ 0 - 57
o2server/x_calendar_assemble_control/src/main/webapp/describe/sources/com/x/calendar/common/excel/reader/ExcelReaderUtil.java

@@ -1,57 +0,0 @@
-package com.x.calendar.common.excel.reader;
-
-import java.io.InputStream;
-
-public class ExcelReaderUtil {
-	
-	//excel2003扩展名
-	public static final String EXCEL03_EXTENSION = ".xls";
-	//excel2007扩展名
-	public static final String EXCEL07_EXTENSION = ".xlsx";
-	
-	/**
-	 * 读取Excel文件,可能是03也可能是07版本
-	 * @param excel03
-	 * @param excel07
-	 * @param fileName
-	 * @throws Exception 
-	 */
-	public static void readExcel(IRowReader reader, String fileName, String fileKey, int startRow ) throws Exception{
-		// 处理excel2003文件
-		if (fileName.endsWith(EXCEL03_EXTENSION)){
-			Excel2003Reader excel03 = new Excel2003Reader();
-			excel03.setRowReader(reader, fileKey, startRow);
-			excel03.process(fileName);
-		// 处理excel2007文件
-		} else if (fileName.endsWith(EXCEL07_EXTENSION)){
-			Excel2007Reader excel07 = new Excel2007Reader();
-			excel07.setRowReader(reader, fileKey, startRow);
-			excel07.process(fileName);
-		} else {
-			throw new  Exception( "文件格式错误,fileName的扩展名只能是xls或xlsx。" );
-		}
-	}
-	
-	/**
-	 * 读取Excel文件,可能是03也可能是07版本
-	 * @param excel03
-	 * @param excel07
-	 * @param fileName
-	 * @throws Exception 
-	 */
-	public static void readExcel(IRowReader reader,String fileName, InputStream inputStream, String fileKey, int startRow ) throws Exception{
-		// 处理excel2003文件
-		if (fileName.endsWith( EXCEL03_EXTENSION )){
-			Excel2003Reader excel03 = new Excel2003Reader();
-			excel03.setRowReader(reader, fileKey, startRow);
-			excel03.process(inputStream);
-		// 处理excel2007文件
-		} else if (fileName.endsWith(EXCEL07_EXTENSION)){
-			Excel2007Reader excel07 = new Excel2007Reader();
-			excel07.setRowReader(reader, fileKey, startRow);
-			excel07.process(inputStream);
-		} else {
-			throw new  Exception( "文件格式错误,fileName的扩展名只能是xls或xlsx。" );
-		}
-	}
-}

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