zhourui 5 лет назад
Родитель
Сommit
08c6e4350d
100 измененных файлов с 2 добавлено и 8072 удалено
  1. 2 5
      o2server/pom.xml
  2. 0 841
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/common/date/DateOperation.java
  3. 0 24
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/AbstractFactory.java
  4. 0 33
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/ApplicationServletContextListener.java
  5. 0 51
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/ThisApplication.java
  6. 0 77
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/AttachmentFactory.java
  7. 0 52
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/BatchOperationFactory.java
  8. 0 118
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/ChatFactory.java
  9. 0 94
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/DynamicFactory.java
  10. 0 92
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/ProjectGroupFactory.java
  11. 0 129
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/ProjectGroupReleFactory.java
  12. 0 229
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/ReviewFactory.java
  13. 0 80
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/SystemConfigFactory.java
  14. 0 166
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/TaskFactory.java
  15. 0 138
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/TaskGroupFactory.java
  16. 0 139
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/TaskGroupReleFactory.java
  17. 0 420
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/TaskListFactory.java
  18. 0 124
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/TaskTagFactory.java
  19. 0 122
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/TaskViewFactory.java
  20. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/JaxrsCipherManagerFilter.java
  21. 0 129
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ActionDelete.java
  22. 0 104
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ActionDownload.java
  23. 0 105
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ActionDownloadStream.java
  24. 0 63
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ActionGet.java
  25. 0 72
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ActionListWithProject.java
  26. 0 72
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ActionListWithTask.java
  27. 0 185
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ActionProjectAttachmentUpload.java
  28. 0 183
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ActionTaskAttachmentUpload.java
  29. 0 193
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/AttachmentAction.java
  30. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/AttachmentNotExistsException.java
  31. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/AttachmentQueryByIdException.java
  32. 0 25
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/BaseAction.java
  33. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionAttachmentDelete.java
  34. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionAttachmentIdEmpty.java
  35. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionAttachmentNotExists.java
  36. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionAttachmentQueryById.java
  37. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionEmptyExtension.java
  38. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionProjectIdEmpty.java
  39. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionProjectNotExists.java
  40. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionQueryProjectById.java
  41. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionTaskIdEmpty.java
  42. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionTaskNotExists.java
  43. 0 119
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ActionDelete.java
  44. 0 70
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ActionGet.java
  45. 0 58
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ActionGetContent.java
  46. 0 92
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ActionListNextWithFilter.java
  47. 0 28
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/BaseAction.java
  48. 0 137
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ChatAction.java
  49. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ChatContentEmptyException.java
  50. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ChatFlagForQueryEmptyException.java
  51. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ChatIDEmptyException.java
  52. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ChatNotExistsException.java
  53. 0 20
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ChatPersistException.java
  54. 0 20
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ChatQueryException.java
  55. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/TaskIDEmptyException.java
  56. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/TaskNotExistsException.java
  57. 0 131
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/WrapInQueryChat.java
  58. 0 81
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ActionGet.java
  59. 0 66
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ActionGetWithCode.java
  60. 0 46
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ActionIsManager.java
  61. 0 58
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ActionListAll.java
  62. 0 102
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ActionSave.java
  63. 0 22
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/BaseAction.java
  64. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ExceptionConfigCodeEmpty.java
  65. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ExceptionConfigIdEmpty.java
  66. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ExceptionConfigInfoProcess.java
  67. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ExceptionConfigNameEmpty.java
  68. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ExceptionConfigNotExists.java
  69. 0 151
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/SystemConfigAction.java
  70. 0 132
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/ActionListNextWithFilter.java
  71. 0 149
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/ActionListNextWithProject.java
  72. 0 151
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/ActionListNextWithTask.java
  73. 0 21
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/BaseAction.java
  74. 0 95
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/DynamicAction.java
  75. 0 20
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/DynamicPersistException.java
  76. 0 20
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/DynamicQueryException.java
  77. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/ProjectIdForQueryEmptyException.java
  78. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/TaskIdForQueryEmptyException.java
  79. 0 122
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/WrapInTaskTag.java
  80. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/extfield/ProjectFlagForQueryEmptyException.java
  81. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/extfield/ProjectNotExistsException.java
  82. 0 140
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionAddTask2ListWithBehindTask.java
  83. 0 141
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionAddTask2ListWithOrderNumber.java
  84. 0 75
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionDelete.java
  85. 0 124
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionGet.java
  86. 0 77
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionList.java
  87. 0 207
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionListWithTaskGroupWithTask.java
  88. 0 95
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionRefreshTaskList.java
  89. 0 73
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionRemoveTaskFromList.java
  90. 0 131
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionSave.java
  91. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/TaskIdForAddEmptyException.java
  92. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/TaskIdForRemoveEmptyException.java
  93. 0 212
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/TaskListAction.java
  94. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/TaskListFlagForQueryEmptyException.java
  95. 0 12
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/TaskListNotExistsException.java
  96. 0 20
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/TaskListPersistException.java
  97. 0 20
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/TaskListQueryException.java
  98. 0 195
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/WoTaskSimple.java
  99. 0 136
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/project/ActionDelete.java
  100. 0 66
      o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/project/ActionStar.java

+ 2 - 5
o2server/pom.xml

@@ -1,5 +1,4 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" 
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>o2oa</groupId>
 	<artifactId>o2server</artifactId>
@@ -20,7 +19,6 @@
 		<module>x_bbs_core_entity</module>
 		<module>x_calendar_core_entity</module>
 		<module>x_cms_core_entity</module>
-		<module>x_cms_core_express</module>
 		<module>x_component_core_entity</module>
 		<module>x_file_core_entity</module>
 		<module>x_general_core_entity</module>
@@ -33,13 +31,13 @@
 		<module>x_organization_core_entity</module>
 		<module>x_portal_core_entity</module>
 		<module>x_processplatform_core_entity</module>
-		<module>x_teamwork_core_entity</module>
 		<module>x_program_center_core_entity</module>
 		<module>x_organization_core_express</module>
 		<module>x_query_core_express</module>
 		<module>x_processplatform_core_express</module>
 		<module>x_bbs_assemble_control</module>
 		<module>x_calendar_assemble_control</module>
+		<module>x_cms_core_express</module>
 		<module>x_cms_assemble_control</module>
 		<module>x_attendance_assemble_control</module>
 		<module>x_component_assemble_control</module>
@@ -64,7 +62,6 @@
 		<module>x_query_assemble_designer</module>
 		<module>x_query_assemble_surface</module>
 		<module>x_query_service_processing</module>
-		<module>x_teamwork_assemble_control</module>
 		<module>x_program_center</module>
 		<module>x_console</module>
 	</modules>

+ 0 - 841
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/common/date/DateOperation.java

@@ -1,841 +0,0 @@
-package com.x.teamwork.assemble.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;
-
-public class DateOperation {
-	
-	/**
-	 * 根据样式得到格式化对象SimpleDateFormat
-	 * @param date
-	 * @param style
-	 * @return
-	 */
-	public static String getDate(Date date, String style) {
-		SimpleDateFormat format = new SimpleDateFormat(style);
-		return format.format(date);
-	}
-
-	/**
-	 * 得到某日期的日期部分
-	 * 
-	 * @param date
-	 * @return yyyy-MM-dd
-	 */
-	public static String getDate(Date date) {
-		return format1.format(date);
-	}
-
-	/**
-	 * 得到某日期的时间部分
-	 * 
-	 * @param date
-	 * @return HH:mm:ss
-	 */
-	public static  String getTime(Date date) {
-		return format2.format(date);
-	}
-
-	public static  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".equalsIgnoreCase(style.trim())){
-			date = format3.parse(dateString);
-		}else if( "yyyy-MM-dd HH:mm".equalsIgnoreCase(style.trim())){
-			date = format3_2.parse(dateString);
-		}else if( "yyyy/MM/dd HH:mm:ss".equalsIgnoreCase(style.trim())){
-			date = format3_1.parse(dateString);
-		}else if( "yyyy/MM/dd".equalsIgnoreCase(style.trim())){
-			date = format4.parse(dateString);
-		}else if( "yyyy-MM-dd".equalsIgnoreCase(style.trim())){
-			date = format1.parse(dateString);
-		}else if( "yyyyMMdd".equalsIgnoreCase(style.trim())){
-			date = format5.parse(dateString);
-		}else if( "yyyyMMddHHmmss".equalsIgnoreCase(style.trim())){
-			date = format7.parse(dateString);
-		}else if( "HH:mm:ss".equalsIgnoreCase(style.trim())){
-			date = format2.parse(dateString);
-		}else if( "HH:mm".equalsIgnoreCase(style.trim())){
-			date = format2_1.parse(dateString);
-		}else{
-			throw new Exception( "对不起,您输入的日期style系统无法识别,请检查您的参数输入!" );
-		}
-		return date;
-	}
-	
-	/**
-	 * 将字符串转换为日期格式
-	 * 会尝试多种格式转换,转换成功后返回结果
-	 * @param dateString
-	 * @return
-	 * @throws Exception
-	 */
-	public static  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" );
-			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){}
-		
-		try{
-			date = getDateFromString( dateString, "HH:mm" );
-			return date;
-		}catch(Exception e){}
-		
-		throw new Exception( "the style of date has error, date:" + dateString );
-	}
-	
-	
-	public static  String getDateStringFromDate(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".equalsIgnoreCase(style.trim())){
-			dateString = format3.format(date);
-		}else if( "yyyy/MM/dd HH:mm:ss".equalsIgnoreCase(style.trim())){
-			dateString = format3_1.format(date);
-		}else if( "yyyy/MM/dd".equalsIgnoreCase(style.trim())){
-			dateString = format4.format(date);
-		}else if( "yyyy-MM-dd".equalsIgnoreCase(style.trim())){
-			dateString = format1.format(date);
-		}else if( "yyyyMMdd".equalsIgnoreCase(style.trim())){
-			dateString = format5.format(date);
-		}else if( "yyyyMMddHHmmss".equalsIgnoreCase(style.trim())){
-			dateString = format7.format(date);
-		}else if( "HH:mm:ss".equalsIgnoreCase(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 static  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 static  String getDayAdd(Date date, int day) {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(date);
-		calendar.add(Calendar.DATE, day);
-		return format1.format(calendar.getTime());
-	}
-
-	/**
-	 * 得到某日期加上或减去月份后的日期,month为负数时减去
-	 * 
-	 * @param date
-	 * @param month
-	 * @return "yyyy-MM-dd"
-	 */
-	public static  String getMonthAdd(Date date, int month) {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(date);
-		calendar.add(Calendar.MONTH, month);
-		return format1.format(calendar.getTime());
-	}
-	
-	/**
-	 * 得到某日期加上或减去分钟后的日期,min为负数时减去
-	 * 
-	 * @param date
-	 * @param month
-	 * @return "yyyy-MM-dd HH:mi:ss"
-	 */
-	public static  String getMinutesAdd(Date date, int min) {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(date);
-		calendar.add(Calendar.MINUTE, min);
-		return format3.format(calendar.getTime());
-	}
-	/**
-	 * 得到某日期的日
-	 * 
-	 * @param Date
-	 *            date
-	 * @return
-	 */
-	public static  String getDay(Date date) {
-		try{
-			return format10.format(date);
-		}catch(Exception e){
-			return "0";
-		}
-	}
-	public static 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 static  String getMonth(Date date) {
-		try{
-			return format9.format(date);
-		}catch(Exception e){
-			return "0";
-		}
-	}
-	public static 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 static  String getYear(Date date) {
-		try{
-			return format8.format(date);
-		}catch(Exception e){
-			return "0";
-		}
-	}
-	public static 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 static  String getHour(Date date) {
-		try{
-			return format11.format(date);
-		}catch(Exception e){
-			return "0";
-		}
-	}
-	/**
-	 * 得到某日期的分钟
-	 * 
-	 * @param Date
-	 *            date
-	 * @return
-	 */
-	public static  String getMinites(Date date) {
-		return format12.format(date);
-	}
-	/**
-	 * 得到某日期的秒
-	 * 
-	 * @param Date
-	 *            date
-	 * @return
-	 */
-	public static  String getSeconds(Date date) {
-		return format13.format(date);
-	}
-	/**
-	 * 得到某年有多少天
-	 * 
-	 * @param String
-	 *            date "yyyy-MM-dd"
-	 * @return
-	 * @throws ParseException
-	 */
-	@SuppressWarnings("static-access")
-	public static  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 static  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 static  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
-	 */
-	public static  int getDaysForMonth(String date) throws ParseException {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(format1.parse(date));
-		return calendar.getActualMaximum( Calendar.DAY_OF_MONTH);
-	}
-
-	/**
-	 * 得到某月有多少天
-	 * 
-	 * @param String
-	 *            date "yyyy-MM"
-	 * @return
-	 * @throws ParseException
-	 */
-	@SuppressWarnings("static-access")
-	public static  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 static  int getDaysForMonth(Date date) throws ParseException {
-		Calendar calendar = Calendar.getInstance();
-		calendar.setTime(date);
-		return calendar.get(Calendar.DAY_OF_MONTH);
-	}
-
-	/**
-	 * 得到当前的日期
-	 * 
-	 * @return
-	 */
-	public static  String getNowDate() {
-		return format1.format(new Date());
-	}
-
-	/**
-	 * 得到当前的时间
-	 * 
-	 * @return
-	 */
-	public static  String getNowTime() {
-		return format2.format(new Date());
-	}
-	/**
-	 * 得到当前的时间
-	 * yyyyMMddHHmmss
-	 * @return
-	 */
-	public static  String getNowTimeChar() {
-		return format7.format(new Date());
-	}
-	/**
-	 * 得到当前的时间
-	 * yyyy-MM-dd HH:mm:ss
-	 * @return
-	 */
-	public static  String getNowDateTime() {
-		return format3.format(new Date());
-	}
-	/**
-	 * 得到两个时间之前的分差
-	 * @param date1 yyyy-MM-dd HH:mm:ss
-	 * @param date2 yyyy-MM-dd HH:mm:ss
-	 * @return
-	 * @throws Exception 
-	 */
-	public static  long getDeff(String date1,String date2) throws Exception {
-		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) {
-			throw e;
-		}
-		return dayNumber;
-	}
-	/**
-	 * 得到两个时间之前的分差
-	 * @param date1 yyyy-MM-dd HH:mm:ss
-	 * @param date2 yyyy-MM-dd HH:mm:ss
-	 * @return
-	 */
-	public static 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) {
-			throw e;
-		}
-		return dayNumber;
-	}
-	/**
-	 * 
-	 * 日期格式转换
-	 * 从YYYY-MM-DD转换到YYYYMMDD
-	 * @param date
-	 * @throws ParseException 
-	 */
-	public static  String changeDateFormat(String dateString) throws ParseException{
-		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) {
-				throw e1;
-			}
-			throw e;
-		}
-		
-		return reslut;
-	}
-	
-	/** 格式 yyyy-MM-dd */
-	public static  final SimpleDateFormat format1 = new SimpleDateFormat( "yyyy-MM-dd" );
-	/** 格式 HH:mm:ss */
-	public static  final SimpleDateFormat format2 = new SimpleDateFormat( "HH:mm:ss" );
-	public static  final SimpleDateFormat format2_1 = new SimpleDateFormat( "HH:mm" );
-	/** 格式 yyyy-MM-dd HH:mm:ss */
-	public static  final SimpleDateFormat format3 = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss" );
-	public static  final SimpleDateFormat format3_2 = new SimpleDateFormat( "yyyy-MM-dd HH:mm" );
-	public static  final SimpleDateFormat format3_1 = new SimpleDateFormat( "yyyy/MM/dd HH:mm:ss" );
-	/** 格式 yyyy/MM/dd */
-	public static  final SimpleDateFormat format4 = new SimpleDateFormat( "yyyy/MM/dd" );
-	/** 格式 yyyyMMdd */
-	public static  final SimpleDateFormat format5 = new SimpleDateFormat( "yyyyMMdd" );
-	/** 格式 HHmmss */
-	public static  final SimpleDateFormat format6 = new SimpleDateFormat( "HHmmss" );
-	/** 格式 yyyyMMddHHmmss */
-	public static  final SimpleDateFormat format7 = new SimpleDateFormat( "yyyyMMddHHmmss" );
-	/** 格式 yyyy */
-	public static  final SimpleDateFormat format8 = new SimpleDateFormat( "yyyy" );
-	/** 格式 MM */
-	public static  final SimpleDateFormat format9 = new SimpleDateFormat( "MM" );
-	/** 格式 dd */
-	public static  final SimpleDateFormat format10 = new SimpleDateFormat( "dd" );
-	/** 格式 HH */
-	public static  final SimpleDateFormat format11 = new SimpleDateFormat( "HH" );
-	/** 格式 mm */
-	public static  final SimpleDateFormat format12 = new SimpleDateFormat( "mm" );
-	/** 格式 ss */
-	public static  final SimpleDateFormat format13 = new SimpleDateFormat( "ss" );
-	/** 格式 ss */
-	public static  final SimpleDateFormat format14 = new SimpleDateFormat( "yyyy-MM" );
-	
-	
-	public static  String getStartOfWeek(String dateString) throws Exception{
-		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 getDateStringFromDate(cal.getTime(), "yyyy-MM-dd" ) + " 00:00:00";
-		} catch (ParseException e) {
-			throw e;
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-	
-	public static  String getEndOfWeek(String dateString) throws Exception{
-		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 getDateStringFromDate(cal.getTime(), "yyyy-MM-dd" ) + " 23:59:59";
-		} catch (ParseException e) {
-			throw e;
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-	
-	
-	
-	/**
-	 * 将时间格式转换为 **月**日**时**分的格式
-	 * @param dateString
-	 * @param style
-	 * @return
-	 * @throws Exception
-	 */
-	public static 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){
-			throw 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 static 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){
-			throw 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
-	 * @throws Exception 
-	 */
-	public static  int getWeekNumOfYear( String dateString ) throws Exception{
-		try {
-			Date date = getDateFromString( dateString , "yyyy-MM-dd" );
-			Calendar cal = Calendar.getInstance();
-			cal.setTime(date);
-			cal.setFirstDayOfWeek(2);//设置每周的第一天是星期一
-			return cal.get( Calendar.WEEK_OF_YEAR );
-		} catch (ParseException e) {
-			throw e;
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-	
-	/**
-	 * 获取日期在一年中的周数
-	 * 结果从1开始
-	 * @param dateString yyyy-mm-dd
-	 * @return
-	 */
-	public static  int getWeekNumOfYear( Date date ){
-		try {
-			Calendar cal = Calendar.getInstance();
-			cal.setTime(date);
-			cal.setFirstDayOfWeek(2);//设置每周的第一天是星期一
-			return cal.get( Calendar.WEEK_OF_YEAR );
-		} catch (Exception e) {
-			throw e;
-		}
-	}
-	
-	/**
-	 * 判断是否周末
-	 * @param recordDate
-	 * @return
-	 */
-	public static boolean isWeekend(Date date) {
-		Calendar cal = Calendar.getInstance();
-	    cal.setTime( date );
-	    if(cal.get(Calendar.DAY_OF_WEEK)==Calendar.SATURDAY||cal.get(Calendar.DAY_OF_WEEK)==Calendar.SUNDAY){
-	       return true;
-	    }
-		return false;
-	}
-	
-	public static long getMinutes( Date date1, Date data2){
-		 long l=data2.getTime()-date1.getTime();
-		 long min=((l/(60*1000)));
-		 return min;
-	}
-
-	/**
-	 * 根据提供的年份月份,获取当月所有的日期字符串:yyyy-mm-dd
-	 * @param s_year
-	 * @param _month
-	 * @return
-	 */
-	public static List<String> getDateStringFormMonth(String s_year, String _month) {
-		List<String> result = new ArrayList<String>();
-		Calendar cal = Calendar.getInstance();
-		int year = 0;
-		int month = 0;
-		int days = 0;
-		try{
-			year = Integer.parseInt( s_year );
-		}catch(Exception e){
-			e.printStackTrace();
-		}
-		try{
-			month = Integer.parseInt( _month );
-		}catch(Exception e){
-			e.printStackTrace();
-		}
-		cal.set(year, month-1, 1);
-		days = cal.getActualMaximum(Calendar.DATE);
-		for( int i =1; i<= days ; i++){
-			result.add( s_year + "-" + (month<10?"0"+month:month) + "-" + (i<10?"0"+i:i));
-		}
-		return result;
-	}
-	
-	/**
-	 * 根据提供的两个时间之间所有的日期字符串:yyyy-mm-dd
-	 * @param startDate
-	 * @param endDate
-	 * @return
-	 * @throws Exception 
-	 */
-	public static List<String> listDateStringBetweenDate( Date startDate, Date endDate ) throws Exception {		
-		List<String> result = new ArrayList<String>();
-		Calendar cal = Calendar.getInstance();
-		startDate = getDateFromString( getDateStringFromDate( startDate, "yyyy-MM-dd" ) );
-		endDate = getDateFromString( getDateStringFromDate( endDate, "yyyy-MM-dd" ) + " 23:59:59" );	
-		cal.setTime( startDate );
-		while( cal.getTime().before(endDate)){
-			//logger.debug( getDateStringFromDate( cal.getTime(), "yyyy-MM-dd" ) );
-			result.add( getDateStringFromDate( cal.getTime(), "yyyy-MM-dd" ));
-			cal.add(Calendar.DATE, 1);
-		}
-		return result;
-	}
-	
-	/**
-	 * 获取日期所在月份的第一天
-	 * @param recordDate
-	 * @return
-	 * @throws Exception 
-	 */
-	public static Date getFirstDateInMonth(Date recordDate) throws Exception {
-		String year = format8.format(recordDate);
-		String month = format9.format(recordDate);
-		return getDateFromString( year + "-" + month + "-01" );
-	}
-	
-	/**
-	 * 获取日期所在月份的第一天
-	 * @param recordDate yyyy-MM-dd
-	 * @return
-	 * @throws Exception 
-	 */
-	public static String getFirstDateStringInMonth(Date recordDate) throws Exception {
-		String year = format8.format(recordDate);
-		String month = format9.format(recordDate);
-		return year + "-" + month + "-01";
-	}
-	
-	/**
-	 * 获取当月的最后一日
-	 * @param date
-	 * @return
-	 */
-	public static Date getLastDayOfMonth(Date date) {  
-        Calendar calendar = convert(date);  
-        calendar.set(Calendar.DATE, calendar.getMaximum(Calendar.DATE));  
-        return calendar.getTime();  
-    }  
-	/** 
-     * 将日期转换为日历 
-     * @param date 日期 
-     * @return 日历 
-     */  
-    private static Calendar convert(Date date) {  
-        Calendar calendar = Calendar.getInstance();  
-        calendar.setTime(date);  
-        return calendar;  
-    }  
-	/**
-	 * 获取日期所在月份的第一天
-	 * @param recordDate
-	 * @return
-	 * @throws Exception 
-	 */
-	public static Date getLastDateInMonth(Date recordDate) throws Exception {
-		Date lastDate = getLastDayOfMonth(recordDate);
-		return getDateFromString( getDateStringFromDate( lastDate, "yyyy-MM-dd" ) );
-	}
-	
-	/**
-	 * 获取日期所在月份的第一天
-	 * @param recordDate yyyy-MM-dd
-	 * @return
-	 * @throws Exception 
-	 */
-	public static String getLastDateStringInMonth(Date recordDate) throws Exception {
-		Date lastDate = getLastDayOfMonth(recordDate);
-		return getDateStringFromDate( lastDate, "yyyy-MM-dd" );
-	}
-
-	/**
-	 * 获取今天开始的时间
-	 * @return
-	 */
-	public static Date getTodayStartTime() {
-		String todayDateTime = getNowDate() + " 00:00:00";
-		try {
-			return getDateFromString( todayDateTime );
-		} catch (Exception e) {
-			return new Date();
-		}
-	}
-}

+ 0 - 24
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/AbstractFactory.java

@@ -1,24 +0,0 @@
-package com.x.teamwork.assemble.control;
-
-import com.x.base.core.container.EntityManagerContainer;
-
-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();
-	}
-
-}

+ 0 - 33
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/ApplicationServletContextListener.java

@@ -1,33 +0,0 @@
-package com.x.teamwork.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 - 51
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/ThisApplication.java

@@ -1,51 +0,0 @@
-package com.x.teamwork.assemble.control;
-
-import com.x.base.core.project.Context;
-import com.x.base.core.project.message.MessageConnector;
-import com.x.teamwork.assemble.control.queue.QueueBatchOperation;
-import com.x.teamwork.assemble.control.service.SystemConfigPersistService;
-import com.x.teamwork.assemble.control.timertask.Timertask_BatchOperationTask;
-import com.x.teamwork.assemble.control.timertask.Timertask_CheckAllTaskOverTime;
-import com.x.teamwork.assemble.control.timertask.Timertask_RefreshAllTaskReview;
-
-public class ThisApplication {
-	
-	protected static Context context;
-	public static QueueBatchOperation queueBatchOperation;
-	
-	public static Context context() {
-		return context;
-	}
-
-	public static void init() {
-		try {
-			//执行消息操作
-			queueBatchOperation = new QueueBatchOperation();
-
-			MessageConnector.start(context());
-
-			context().startQueue( queueBatchOperation );
-
-			new SystemConfigPersistService().initSystemConfig();
-
-			//每隔5分钟检查是否有未完成的批处理工作需要完成以及是否有未review的task需要核对权限信息
-			context.schedule( Timertask_BatchOperationTask.class, "0 */2 * * * ?" );
-			
-			//每天凌晨把所有项目的所有工作任务的权限和review信息核对一次
-			context.schedule( Timertask_RefreshAllTaskReview.class, "0 0 2 * * ?" );
-			
-			//每30分钟核对一次所有的工作任务,判断工作任务是否已经超时
-			//context.schedule( Timertask_CheckAllTaskOverTime.class, "0 0/30 * * * ?" ); 
-			context.schedule( Timertask_CheckAllTaskOverTime.class, "0 */9 * * * ?" );
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-
-	public static void destroy() {
-		try {
-		} catch (Exception e) {
-			e.printStackTrace();
-		}
-	}
-}

+ 0 - 77
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/AttachmentFactory.java

@@ -1,77 +0,0 @@
-package com.x.teamwork.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.exception.ExceptionWhen;
-import com.x.base.core.project.tools.ListTools;
-import com.x.teamwork.assemble.control.AbstractFactory;
-import com.x.teamwork.assemble.control.Business;
-import com.x.teamwork.core.entity.Attachment;
-import com.x.teamwork.core.entity.Attachment_;
-
-public class AttachmentFactory extends AbstractFactory {
-
-	public AttachmentFactory(Business business) throws Exception {
-		super(business);
-	}
-	
-	public Attachment get( String id ) throws Exception {
-		return this.entityManagerContainer().find(id, Attachment.class, ExceptionWhen.none);
-	}
-
-	public List<String> listAll() throws Exception {
-		EntityManager em = this.entityManagerContainer().get(Attachment.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<Attachment> root = cq.from( Attachment.class);
-		cq.select(root.get(Attachment_.id));
-		return em.createQuery(cq).getResultList();
-	}
-
-	public List<Attachment> list(List<String> ids) throws Exception {
-		if( ListTools.isEmpty( ids ) ){
-			return new ArrayList<Attachment>();
-		}
-		EntityManager em = this.entityManagerContainer().get(Attachment.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Attachment> cq = cb.createQuery(Attachment.class);
-		Root<Attachment> root = cq.from(Attachment.class);
-		Predicate p = root.get(Attachment_.id).in(ids);
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public List<Attachment> listAttachmentWithProject(String project) throws Exception {
-		if( StringUtils.isEmpty( project ) ){
-			return new ArrayList<Attachment>();
-		}
-		EntityManager em = this.entityManagerContainer().get(Attachment.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Attachment> cq = cb.createQuery(Attachment.class);
-		Root<Attachment> root = cq.from(Attachment.class);
-		Predicate p = cb.equal( root.get(Attachment_.projectId), project );
-		p = cb.and( p, cb.equal( root.get(Attachment_.bundleObjType ), "PROJECT"));
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	public List<Attachment> listAttachmentWithTask(String taskId ) throws Exception {
-		if( StringUtils.isEmpty( taskId ) ){
-			return new ArrayList<Attachment>();
-		}
-		EntityManager em = this.entityManagerContainer().get(Attachment.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Attachment> cq = cb.createQuery(Attachment.class);
-		Root<Attachment> root = cq.from(Attachment.class);
-		Predicate p = cb.equal( root.get(Attachment_.taskId ), taskId );
-		p = cb.and( p, cb.equal( root.get(Attachment_.bundleObjType ), "TASK"));
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-}

+ 0 - 52
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/BatchOperationFactory.java

@@ -1,52 +0,0 @@
-package com.x.teamwork.assemble.control.factory;
-
-import com.x.teamwork.assemble.control.AbstractFactory;
-import com.x.teamwork.assemble.control.Business;
-import com.x.teamwork.core.entity.BatchOperation;
-import com.x.teamwork.core.entity.BatchOperation_;
-
-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.List;
-
-/**
- * 批处理操作信息记录,比如需要级联删除大量的工作重新计算权限等
- */
-public class BatchOperationFactory extends AbstractFactory {
-
-	public BatchOperationFactory(Business business) throws Exception {
-		super(business);
-	}
-
-	public List<BatchOperation> list( List<String> ids ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( BatchOperation.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<BatchOperation> cq = cb.createQuery( BatchOperation.class );
-		Root<BatchOperation> root = cq.from( BatchOperation.class );
-		Predicate p = root.get( BatchOperation_.id).in( ids );
-		cq.orderBy( cb.asc( root.get( BatchOperation.createTime_FIELDNAME ) ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public List<BatchOperation> list(Integer maxCount) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( BatchOperation.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<BatchOperation> cq = cb.createQuery( BatchOperation.class );
-		Root<BatchOperation> root = cq.from( BatchOperation.class );
-		cq.orderBy( cb.asc( root.get( BatchOperation.createTime_FIELDNAME ) ) );
-		return em.createQuery(cq).setMaxResults(maxCount).getResultList();
-	}
-	
-	public List<BatchOperation> listNotRun(Integer maxCount) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( BatchOperation.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<BatchOperation> cq = cb.createQuery( BatchOperation.class );
-		Root<BatchOperation> root = cq.from( BatchOperation.class );
-		Predicate p = cb.isFalse( root.get( BatchOperation_.isRunning ) );
-		cq.orderBy( cb.asc( root.get( BatchOperation.createTime_FIELDNAME ) ) );
-		return em.createQuery(cq.where(p)).setMaxResults(maxCount).getResultList();
-	}
-}

+ 0 - 118
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/ChatFactory.java

@@ -1,118 +0,0 @@
-package com.x.teamwork.assemble.control.factory;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Order;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import com.x.base.core.project.exception.ExceptionWhen;
-import com.x.teamwork.assemble.control.AbstractFactory;
-import com.x.teamwork.assemble.control.Business;
-import com.x.teamwork.core.entity.Chat;
-import com.x.teamwork.core.entity.ChatContent;
-import com.x.teamwork.core.entity.Chat_;
-import com.x.teamwork.core.entity.tools.CriteriaBuilderTools;
-import com.x.teamwork.core.entity.tools.filter.QueryFilter;
-
-
-public class ChatFactory extends AbstractFactory {
-
-	public ChatFactory( Business business ) throws Exception {
-		super(business);
-	}
-
-	/**
-	 * 获取指定Id的Chat实体信息对象
-	 * @param id
-	 * @return
-	 * @throws Exception
-	 */
-	public Chat get( String id ) throws Exception {
-		return this.entityManagerContainer().find( id, Chat.class, ExceptionWhen.none );
-	}
-
-	/**
-	 * 根据ChatId获取LOB内容
-	 * @param id
-	 * @return
-	 * @throws Exception
-	 */
-	public ChatContent getContent(String id) throws Exception {
-		return this.entityManagerContainer().find( id, ChatContent.class, ExceptionWhen.none );
-	}
-	
-	/**
-	 * 根据ChatId获取LOB内容
-	 * @param id
-	 * @return
-	 * @throws Exception
-	 */
-	public String getContentString(String id) throws Exception {
-		ChatContent  content = this.entityManagerContainer().find( id, ChatContent.class, ExceptionWhen.none );
-		if( content != null ) {
-			return content.getContent();
-		}
-		return null;
-	}
-	
-	/**
-	 * 根据条件查询符合条件的Chat数量
-	 * @param personName
-	 * @param unitNames
-	 * @param groupNames
-	 * @param queryFilter
-	 * @return
-	 * @throws Exception
-	 */
-	public Long countWithFilter( QueryFilter queryFilter) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( Chat.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Long> cq = cb.createQuery(Long.class);
-		Root<Chat> root = cq.from(Chat.class);
-		Predicate p = CriteriaBuilderTools.composePredicateWithQueryFilter( Chat_.class, cb, null, root, queryFilter );
-		cq.select(cb.count(root)).where(p);
-		return em.createQuery(cq).getSingleResult();
-	}
-	
-	/**
-	 * 根据条件查询符合条件的项目信息ID(查询前N条内存分页支持)
-	 * @param personName
-	 * @param unitNames
-	 * @param groupNames
-	 * @param queryFilter
-	 * @return
-	 * @throws Exception
-	 */
-	public List<Chat> listWithFilter( Integer maxCount, String orderField, String orderType, QueryFilter queryFilter ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( Chat.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Chat> cq = cb.createQuery(Chat.class);
-		Root<Chat> root = cq.from(Chat.class);
-		Predicate p = CriteriaBuilderTools.composePredicateWithQueryFilter( Chat_.class, cb, null, root, queryFilter );		
-		
-		Order orderWithField = CriteriaBuilderTools.getOrder(cb, root, Chat_.class, orderField, orderType);
-		if( orderWithField != null ){
-			cq.orderBy( orderWithField );
-		}
-		return em.createQuery(cq.where(p)).setMaxResults( maxCount).getResultList();
-	}
-	
-	/**
-	 * 根据条件查询符合条件的项目信息ID(根据sequnce分页支持)
-	 * @param maxCount
-	 * @param sequenceFieldValue
-	 * @param orderField
-	 * @param orderType
-	 * @param queryFilter
-	 * @return
-	 * @throws Exception
-	 */
-	public List<Chat> listWithFilter( Integer maxCount, Object sequenceFieldValue, String orderField, String orderType, QueryFilter queryFilter ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( Chat.class );
-		return CriteriaBuilderTools.listNextWithCondition( em, Chat.class, Chat_.class, maxCount, queryFilter, sequenceFieldValue, orderField, orderType );
-	}
-}

+ 0 - 94
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/DynamicFactory.java

@@ -1,94 +0,0 @@
-package com.x.teamwork.assemble.control.factory;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Order;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-import com.x.base.core.project.exception.ExceptionWhen;
-import com.x.teamwork.assemble.control.AbstractFactory;
-import com.x.teamwork.assemble.control.Business;
-import com.x.teamwork.core.entity.Dynamic;
-import com.x.teamwork.core.entity.DynamicDetail;
-import com.x.teamwork.core.entity.Dynamic_;
-import com.x.teamwork.core.entity.tools.CriteriaBuilderTools;
-import com.x.teamwork.core.entity.tools.filter.QueryFilter;
-
-
-public class DynamicFactory extends AbstractFactory {
-
-	public DynamicFactory( Business business ) throws Exception {
-		super(business);
-	}
-
-	/**
-	 * 获取指定Id的Dynamic实体信息对象
-	 * @param id
-	 * @return
-	 * @throws Exception
-	 */
-	public Dynamic get( String id ) throws Exception {
-		return this.entityManagerContainer().find( id, Dynamic.class, ExceptionWhen.none );
-	}
-
-	public DynamicDetail getDetail(String flag) throws Exception {
-		return this.entityManagerContainer().find( flag, DynamicDetail.class, ExceptionWhen.none );
-	}
-	
-	/**
-	 * 根据过滤条件查询符合要求的项目信息数量
-	 * @param queryFilter
-	 * @return
-	 * @throws Exception
-	 */
-	public Long countWithFilter( QueryFilter queryFilter) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( Dynamic.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Long> cq = cb.createQuery(Long.class);
-		Root<Dynamic> root = cq.from(Dynamic.class);
-		Predicate p = CriteriaBuilderTools.composePredicateWithQueryFilter( Dynamic_.class, cb, null, root, queryFilter );
-		cq.select(cb.count(root));
-		return em.createQuery(cq.where(p)).getSingleResult();
-	}
-	
-	/**
-	 * 根据条件查询符合条件的项目信息ID(查询前N条内存分页支持)
-	 * @param maxCount
-	 * @param orderField
-	 * @param orderType
-	 * @param queryFilter
-	 * @return
-	 * @throws Exception
-	 */
-	public List<Dynamic> listWithFilter( Integer maxCount, String orderField, String orderType, QueryFilter queryFilter ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( Dynamic.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Dynamic> cq = cb.createQuery(Dynamic.class);
-		Root<Dynamic> root = cq.from(Dynamic.class);
-		Predicate p = CriteriaBuilderTools.composePredicateWithQueryFilter( Dynamic_.class, cb, null, root, queryFilter );		
-		
-		Order orderWithField = CriteriaBuilderTools.getOrder(cb, root, Dynamic_.class, orderField, orderType);
-		if( orderWithField != null ){
-			cq.orderBy( orderWithField );
-		}
-		return em.createQuery(cq.where(p)).setMaxResults( maxCount).getResultList();
-	}
-	
-	/**
-	 * 根据条件查询符合条件的项目信息ID(根据sequnce分页支持)
-	 * @param maxCount
-	 * @param sequenceFieldValue
-	 * @param orderField
-	 * @param orderType
-	 * @param queryFilter
-	 * @return
-	 * @throws Exception
-	 */
-	public List<Dynamic> listWithFilter( Integer maxCount, Object sequenceFieldValue, String orderField, String orderType, QueryFilter queryFilter ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( Dynamic.class );
-		return CriteriaBuilderTools.listNextWithCondition( em, Dynamic.class, Dynamic_.class, maxCount, queryFilter, sequenceFieldValue, orderField, orderType );
-	}
-}

+ 0 - 92
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/ProjectGroupFactory.java

@@ -1,92 +0,0 @@
-package com.x.teamwork.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.exception.ExceptionWhen;
-import com.x.teamwork.assemble.control.AbstractFactory;
-import com.x.teamwork.assemble.control.Business;
-import com.x.teamwork.core.entity.ProjectGroup;
-import com.x.teamwork.core.entity.ProjectGroup_;
-
-
-public class ProjectGroupFactory extends AbstractFactory {
-
-	public ProjectGroupFactory( Business business ) throws Exception {
-		super(business);
-	}
-
-	/**
-	 * 获取指定Id的ProjectGroup实体信息对象
-	 * @param id
-	 * @return
-	 * @throws Exception
-	 */
-	public ProjectGroup get( String id ) throws Exception {
-		return this.entityManagerContainer().find( id, ProjectGroup.class, ExceptionWhen.none );
-	}
-	
-	/**
-	 * 列示指定Id的ProjectGroup实体信息列表
-	 * @param ids
-	 * @return
-	 * @throws Exception
-	 */
-	public List<ProjectGroup> list( List<String> ids ) throws Exception {
-		if( ids == null || ids.size() == 0 ){
-			return new ArrayList<ProjectGroup>();
-		}
-		EntityManager em = this.entityManagerContainer().get(ProjectGroup.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<ProjectGroup> cq = cb.createQuery(ProjectGroup.class);
-		Root<ProjectGroup> root = cq.from(ProjectGroup.class);
-		Predicate p = root.get(ProjectGroup_.id).in(ids);
-		cq.orderBy( cb.desc( root.get( ProjectGroup_.updateTime ) ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	/**
-	 * 根据用户列示ProjectGroup实体信息列表
-	 * @param person
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listByPerson( String person ) throws Exception {
-		if( StringUtils.isEmpty( person ) ){
-			throw new Exception("person can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(ProjectGroup.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<ProjectGroup> root = cq.from(ProjectGroup.class);
-		Predicate p = cb.equal( root.get(ProjectGroup_.owner), person );
-		cq.select( root.get(ProjectGroup_.id ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 根据用户列示ProjectGroup实体信息列表
-	 * @param person
-	 * @return
-	 * @throws Exception
-	 */
-	public List<ProjectGroup> listGroupByPerson( String person ) throws Exception {
-		if( StringUtils.isEmpty( person ) ){
-			throw new Exception("person can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(ProjectGroup.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<ProjectGroup> cq = cb.createQuery(ProjectGroup.class);
-		Root<ProjectGroup> root = cq.from(ProjectGroup.class);
-		Predicate p = cb.equal( root.get(ProjectGroup_.owner), person );
-		return em.createQuery(cq.where(p)).getResultList();
-	}	
-}

+ 0 - 129
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/ProjectGroupReleFactory.java

@@ -1,129 +0,0 @@
-package com.x.teamwork.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.exception.ExceptionWhen;
-import com.x.teamwork.assemble.control.AbstractFactory;
-import com.x.teamwork.assemble.control.Business;
-import com.x.teamwork.core.entity.ProjectGroupRele;
-import com.x.teamwork.core.entity.ProjectGroupRele_;
-
-
-public class ProjectGroupReleFactory extends AbstractFactory {
-
-	public ProjectGroupReleFactory( Business business ) throws Exception {
-		super(business);
-	}
-
-	/**
-	 * 获取指定Id的ProjectGroupRele实体信息对象
-	 * @param id
-	 * @return
-	 * @throws Exception
-	 */
-	public ProjectGroupRele get( String id ) throws Exception {
-		return this.entityManagerContainer().find( id, ProjectGroupRele.class, ExceptionWhen.none );
-	}
-	
-	/**
-	 * 列示指定Id的ProjectGroupRele实体信息列表
-	 * @param ids
-	 * @return
-	 * @throws Exception
-	 */
-	public List<ProjectGroupRele> list( List<String> ids ) throws Exception {
-		if( ids == null || ids.size() == 0 ){
-			return new ArrayList<ProjectGroupRele>();
-		}
-		EntityManager em = this.entityManagerContainer().get(ProjectGroupRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<ProjectGroupRele> cq = cb.createQuery(ProjectGroupRele.class);
-		Root<ProjectGroupRele> root = cq.from(ProjectGroupRele.class);
-		Predicate p = root.get(ProjectGroupRele_.id).in(ids);
-		cq.orderBy( cb.desc( root.get( ProjectGroupRele_.updateTime ) ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	/**
-	 * 根据项目组ID列示项目ID信息列表
-	 * @param group
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listProjectIdByGroup( String group ) throws Exception {
-		if( StringUtils.isEmpty( group ) ){
-			throw new Exception("group can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(ProjectGroupRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<ProjectGroupRele> root = cq.from(ProjectGroupRele.class);
-		Predicate p = cb.equal( root.get(ProjectGroupRele_.groupId), group );
-		cq.select( root.get(ProjectGroupRele_.projectId) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 根据项目组ID列示关联信息ID列表
-	 * @param group
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listByGroup( String group ) throws Exception {
-		if( StringUtils.isEmpty( group ) ){
-			throw new Exception("group can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(ProjectGroupRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<ProjectGroupRele> root = cq.from(ProjectGroupRele.class);
-		Predicate p = cb.equal( root.get(ProjectGroupRele_.groupId), group );
-		cq.select( root.get(ProjectGroupRele_.id) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 根据项目组ID以及项目ID获取一个关联信息
-	 * @param group
-	 * @param project
-	 * @return
-	 * @throws Exception
-	 */
-	public List<ProjectGroupRele> listWithGroupAndProject( String group, String project ) throws Exception {
-		if( StringUtils.isEmpty( group ) ){
-			throw new Exception("group can not be empty!");
-		}
-		if( StringUtils.isEmpty( project ) ){
-			throw new Exception("project can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(ProjectGroupRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<ProjectGroupRele> cq = cb.createQuery(ProjectGroupRele.class);
-		Root<ProjectGroupRele> root = cq.from(ProjectGroupRele.class);
-		Predicate p = cb.equal( root.get(ProjectGroupRele_.groupId), group );
-		p = cb.and( p,  cb.equal( root.get(ProjectGroupRele_.projectId), project ));
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public List<ProjectGroupRele> listReleWithProject(String projectId) throws Exception {
-		if( StringUtils.isEmpty( projectId ) ){
-			throw new Exception("projectId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(ProjectGroupRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<ProjectGroupRele> cq = cb.createQuery(ProjectGroupRele.class);
-		Root<ProjectGroupRele> root = cq.from(ProjectGroupRele.class);
-		Predicate p = cb.equal( root.get(ProjectGroupRele_.projectId), projectId );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-}

+ 0 - 229
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/ReviewFactory.java

@@ -1,229 +0,0 @@
-package com.x.teamwork.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.Order;
-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.teamwork.assemble.control.AbstractFactory;
-import com.x.teamwork.assemble.control.Business;
-import com.x.teamwork.core.entity.Project;
-import com.x.teamwork.core.entity.Project_;
-import com.x.teamwork.core.entity.Review;
-import com.x.teamwork.core.entity.Review_;
-import com.x.teamwork.core.entity.tools.CriteriaBuilderTools;
-import com.x.teamwork.core.entity.tools.filter.QueryFilter;
-/**
- * 工作任务权限控制信息服务类
- */
-public class ReviewFactory extends AbstractFactory {
-	
-	public ReviewFactory( Business business) throws Exception {
-		super(business);
-	}
-	
-	public List<String> listReviewByTask( String taskId,  Integer maxCount ) throws Exception {
-		if( maxCount == null ) {
-			maxCount = 1000;
-		}
-		EntityManager em = this.entityManagerContainer().get( Review.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery( String.class );
-		Root<Review> root = cq.from( Review.class );
-		Predicate p = cb.equal(root.get( Review_.taskId ), taskId );
-		cq.select( root.get( Review_.id) ).where(p);
-		return em.createQuery( cq ).setMaxResults(maxCount).getResultList();
-	}
-	
-	public List<String> listTaskIdsWithPersonAndProject(String person, String project ) throws Exception {
-		if( StringUtils.isEmpty( person ) ) {
-			throw new Exception("person can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get( Review.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery( String.class );
-		Root<Review> root = cq.from( Review.class );
-		Predicate p = cb.equal( root.get( Review_.permissionObj ), person );
-		p = cb.and( p, cb.equal( root.get( Review_.project ), project ));
-		if(!this.getProject(project)){
-			p = cb.and( p, cb.equal( root.get( Review_.deleted ), false ));
-		}
-		cq.select(root.get( Review_.taskId)).where(p);
-		return em.createQuery( cq ).getResultList();
-	}
-	
-	public List<String> listTaskIdsWithPersonAndProject( String project, String person,  Integer maxCount ) throws Exception {
-		if( maxCount == null ) {
-			maxCount = 1000;
-		}
-		EntityManager em = this.entityManagerContainer().get( Review.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery( String.class );
-		Root<Review> root = cq.from( Review.class );
-		Predicate p = cb.equal(root.get( Review_.project ), project );
-		p = cb.and( p, cb.equal(root.get( Review_.permissionObj ), person ));
-		if(!this.getProject(project)){
-			p = cb.and( p, cb.equal( root.get( Review_.deleted ), false ));
-		}
-		cq.select( root.get( Review_.taskId) ).where(p);
-		return em.createQuery( cq ).setMaxResults(maxCount).getResultList();
-	}
-	
-	public List<String> listPermissionByTask( String taskId, Integer maxCount ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( Review.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery( String.class );
-		Root<Review> root = cq.from( Review.class );
-		Predicate p = cb.equal(root.get( Review_.taskId ), taskId );
-		cq.select(root.get( Review_.permissionObj )).where(p);
-		return em.createQuery( cq ).setMaxResults(maxCount).getResultList();
-	}	
-	
-	public List<String> listIdsByTaskAndPerson(String taskId, String person) throws Exception {
-		if( StringUtils.isEmpty( taskId ) ) {
-			throw new Exception("task id can not be empty!");
-		}
-		if( StringUtils.isEmpty( person ) ) {
-			throw new Exception("person can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get( Review.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery( String.class );
-		Root<Review> root = cq.from( Review.class );
-		Predicate p = cb.equal(root.get( Review_.taskId ), taskId );
-		p = cb.and( p, cb.equal( root.get( Review_.permissionObj ), person));
-		cq.select(root.get( Review_.id)).where(p);
-		return em.createQuery( cq ).getResultList();
-	}
-	
-	public List<Review> listByTaskAndPerson(String taskId, String person) throws Exception {
-		if( StringUtils.isEmpty( taskId ) ) {
-			throw new Exception("task id can not be empty!");
-		}
-		if( StringUtils.isEmpty( person ) ) {
-			throw new Exception("person can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get( Review.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Review> cq = cb.createQuery( Review.class );
-		Root<Review> root = cq.from( Review.class );
-		Predicate p = cb.equal(root.get( Review_.taskId ), taskId );
-		p = cb.and( p, cb.equal( root.get( Review_.permissionObj ), person));
-		return em.createQuery( cq.where(p) ).getResultList();
-	}
-
-	public Long countByTask(String taskId) throws Exception {
-		if( StringUtils.isEmpty( taskId ) ) {
-			throw new Exception("task id can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get( Review.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Long> cq = cb.createQuery(Long.class);
-		Root<Review> root = cq.from(Review.class);
-		Predicate p = cb.equal( root.get(Review_.taskId), taskId );
-		cq.select(cb.count(root)).where(p);
-		return em.createQuery(cq).getSingleResult();
-	}
-	
-	public Long countWithFilter(String personName, QueryFilter queryFilter) throws Exception {
-		if( StringUtils.isEmpty( personName ) ) {
-			return 0L;
-		}
-		EntityManager em = this.entityManagerContainer().get( Review.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Long> cq = cb.createQuery(Long.class);
-		Root<Review> root = cq.from(Review.class);
-		Predicate p_permission = cb.equal( root.get(Review_.permissionObj), personName );
-		Predicate p = CriteriaBuilderTools.composePredicateWithQueryFilter( Review_.class, cb, p_permission, root, queryFilter );
-		cq.select(cb.count(root)).where(p);
-		return em.createQuery(cq).getSingleResult();
-	}
-
-	public List<Review> listWithFilter( Integer maxCount, String orderField, String orderType, String personName, QueryFilter queryFilter) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( Review.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Review> cq = cb.createQuery(Review.class);
-		Root<Review> root = cq.from(Review.class);
-		Predicate p_permission = null;		
-		if( StringUtils.isNotEmpty( personName )) {
-			p_permission = CriteriaBuilderTools.predicate_or( cb, p_permission, cb.equal( root.get( Review_.permissionObj ), personName ));
-		}
-		
-		Predicate p = CriteriaBuilderTools.composePredicateWithQueryFilter( Review_.class, cb, p_permission, root, queryFilter );
-		
-		//排序,添加排序列,默认使用sequence
-		List<Order> orders = new ArrayList<>();
-		Order orderWithField = CriteriaBuilderTools.getOrder( cb, root, Review_.class, orderField, orderType );
-		if( orderWithField != null ){
-			orders.add( orderWithField );
-		}
-		
-		if( !Review.taskSequence_FIELDNAME.equalsIgnoreCase( orderField )) {
-			//如果是其他的列,很可能排序值不唯一,所以使用多一列排序列来确定每次查询的顺序
-			orderWithField = CriteriaBuilderTools.getOrder( cb, root, Review_.class, Review.id_FIELDNAME, orderType );
-			if( orderWithField != null ){
-				orders.add( orderWithField );
-			}
-		}		
-		if( ListTools.isNotEmpty(  orders )){
-			cq.orderBy( orders );
-		}
-		return em.createQuery(cq.where(p)).setMaxResults( maxCount).getResultList();
-	}
-
-	public List<String> checkTaskIdsWithPermission(List<String> taskIds, String personName) throws Exception {
-		if( ListTools.isEmpty( taskIds ) ) {
-			throw new Exception("taskIds can not be empty!");
-		}
-		if( StringUtils.isEmpty( personName ) ) {
-			throw new Exception("personName can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get( Review.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery( String.class );
-		Root<Review> root = cq.from( Review.class );
-		Predicate p = cb.equal( root.get( Review_.permissionObj ), personName );
-		p = cb.and( p, root.get( Review_.taskId ).in( taskIds ));
-		p = cb.and( p, cb.equal( root.get( Review_.deleted ), false ));
-		cq.select(root.get( Review_.taskId)).where(p);
-		return em.createQuery( cq ).getResultList();
-	}
-
-	public List<Review> listTaskWithPersonAndParentId(String person, String taskId) throws Exception {
-		if( StringUtils.isEmpty( person ) ) {
-			throw new Exception("person can not be empty!");
-		}
-		if( StringUtils.isEmpty( taskId ) ) {
-			throw new Exception("taskId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get( Review.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Review> cq = cb.createQuery( Review.class );
-		Root<Review> root = cq.from( Review.class );
-		Predicate p = cb.equal( root.get( Review_.permissionObj ), person );
-		p = cb.and( p, cb.equal( root.get( Review_.parent ), taskId ));
-		p = cb.and( p, cb.equal( root.get( Review_.deleted ), false ));
-		return em.createQuery( cq.where(p) ).getResultList();
-	}
-	
-	public Boolean getProject(String project) throws Exception {
-		if( StringUtils.isEmpty( project ) ) {
-			throw new Exception("project id can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get( Project.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Boolean> cq = cb.createQuery(Boolean.class);
-		Root<Project> root = cq.from(Project.class);
-		Predicate p = cb.equal( root.get(Project_.id), project );
-		cq.select(root.get( Project_.deleted)).where(p);
-		return em.createQuery(cq).getSingleResult();
-	}
-}

+ 0 - 80
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/SystemConfigFactory.java

@@ -1,80 +0,0 @@
-package com.x.teamwork.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.teamwork.assemble.control.AbstractFactory;
-import com.x.teamwork.assemble.control.Business;
-import com.x.teamwork.core.entity.SystemConfig;
-import com.x.teamwork.core.entity.SystemConfig_;
-
-public class SystemConfigFactory extends AbstractFactory {
-	
-	public SystemConfigFactory( Business business) throws Exception {
-		super(business);
-	}
-
-	public SystemConfig get( String id ) throws Exception {
-		return this.entityManagerContainer().find(id, SystemConfig.class, ExceptionWhen.none);
-	}
-
-	public List<SystemConfig> listAll() throws Exception {
-		EntityManager em = this.entityManagerContainer().get(SystemConfig.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<SystemConfig> cq = cb.createQuery(SystemConfig.class);
-		@SuppressWarnings("unused")
-		Root<SystemConfig> root = cq.from( SystemConfig.class);
-		return em.createQuery(cq).getResultList();
-	}
-
-	public List<SystemConfig> list(List<String> ids) throws Exception {
-		if( ids == null || ids.size() == 0 ){
-			return new ArrayList<SystemConfig>();
-		}
-		EntityManager em = this.entityManagerContainer().get(SystemConfig.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<SystemConfig> cq = cb.createQuery(SystemConfig.class);
-		Root<SystemConfig> root = cq.from(SystemConfig.class);
-		Predicate p = root.get( SystemConfig_.id).in(ids);
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public List<String> listIdsByCode(String code) throws Exception {
-		if( code == null || code.isEmpty() ){
-			return null;
-		}
-		EntityManager em = this.entityManagerContainer().get(SystemConfig.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<SystemConfig> root = cq.from(SystemConfig.class);
-		Predicate p = cb.equal(root.get(SystemConfig_.configCode),  code);
-		cq.select(root.get(SystemConfig_.id));
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public SystemConfig getWithConfigCode( String configCode ) throws Exception {
-		if( configCode == null || configCode.isEmpty() ){
-			return null;
-		}
-		SystemConfig attendanceSetting = null;
-		List<SystemConfig> settingList = null;
-		EntityManager em = this.entityManagerContainer().get(SystemConfig.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<SystemConfig> cq = cb.createQuery(SystemConfig.class);
-		Root<SystemConfig> root = cq.from(SystemConfig.class);
-		Predicate p = cb.equal(root.get( SystemConfig_.configCode ),  configCode );
-		settingList = em.createQuery(cq.where(p)).getResultList();
-		if( settingList != null && settingList.size() > 0 ){
-			attendanceSetting = settingList.get(0);
-		}
-		return attendanceSetting;
-	}
-	
-}

+ 0 - 166
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/TaskFactory.java

@@ -1,166 +0,0 @@
-package com.x.teamwork.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.exception.ExceptionWhen;
-import com.x.teamwork.assemble.control.AbstractFactory;
-import com.x.teamwork.assemble.control.Business;
-import com.x.teamwork.core.entity.Task;
-import com.x.teamwork.core.entity.TaskDetail;
-import com.x.teamwork.core.entity.Task_;
-
-
-public class TaskFactory extends AbstractFactory {
-
-	public TaskFactory( Business business ) throws Exception {
-		super(business);
-	}
-
-	/**
-	 * 获取指定Id的Task实体信息对象
-	 * @param id
-	 * @return
-	 * @throws Exception
-	 */
-	public Task get( String id ) throws Exception {
-		return this.entityManagerContainer().find( id, Task.class, ExceptionWhen.none );
-	}
-	
-	/**
-	 * 获取指定Id的TaskDetail实体信息对象
-	 * @param id
-	 * @return
-	 * @throws Exception
-	 */
-	public TaskDetail getDetail( String id ) throws Exception {
-		return this.entityManagerContainer().find( id, TaskDetail.class, ExceptionWhen.none );
-	}
-	
-	/**
-	 * 列示指定Id的Task实体信息列表
-	 * @param ids
-	 * @return
-	 * @throws Exception
-	 */
-	public List<Task> list( List<String> ids ) throws Exception {
-		if( ids == null || ids.size() == 0 ){
-			return new ArrayList<Task>();
-		}
-		EntityManager em = this.entityManagerContainer().get(Task.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Task> cq = cb.createQuery(Task.class);
-		Root<Task> root = cq.from(Task.class);
-		Predicate p = root.get(Task_.id).in(ids);
-		cq.orderBy( cb.asc( root.get( Task_.createTime ) ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 根据类别列示Task实体ID信息列表
-	 * @param application
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listByProject( String projectId ) throws Exception {
-		if( StringUtils.isEmpty( projectId ) ){
-			throw new Exception("projectId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(Task.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<Task> root = cq.from(Task.class);
-		Predicate p = cb.equal( root.get(Task_.project), projectId );
-		cq.select( root.get(Task_.id ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 查询未review的工作任务信息
-	 * @param maxCount
-	 * @return
-	 * @throws Exception
-	 */
-	public List<Task> listUnReviewTask(int maxCount) throws Exception {
-		if( maxCount == 0  ){
-			maxCount = 100;
-		}
-		EntityManager em = this.entityManagerContainer().get(Task.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Task> cq = cb.createQuery(Task.class);
-		Root<Task> root = cq.from(Task.class);
-		Predicate p = cb.or( cb.isNull(root.get(Task_.reviewed )), cb.isFalse( root.get(Task_.reviewed )));
-		cq.orderBy( cb.asc( root.get( Task_.updateTime ) ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	
-	/**
-	 * 根据类别列示Task实体信息列表
-	 * @param application
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listByParent( String pid) throws Exception {
-		if( StringUtils.isEmpty( pid ) ){
-			throw new Exception("projectId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(Task.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<Task> root = cq.from(Task.class);
-		Predicate p = cb.equal( root.get(Task_.parent), pid );
-		cq.select( root.get(Task_.id ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 根据条件查询符合条件的项目信息数量
-	 * @param projectId
-	 * @return
-	 * @throws Exception
-	 */
-	public Long countWithProject( String projectId ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( Task.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Long> cq = cb.createQuery(Long.class);
-		Root<Task> root = cq.from(Task.class);
-		Predicate p = cb.equal( root.get( Task_.project), projectId );
-		cq.select(cb.count(root)).where(p);
-		return em.createQuery(cq).getSingleResult();
-	}
-
-	public List<Task> allUnCompletedSubTasks(String taskId) throws Exception {
-		if( StringUtils.isEmpty( taskId )  ){
-			return null;
-		}
-		EntityManager em = this.entityManagerContainer().get(Task.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Task> cq = cb.createQuery(Task.class);
-		Root<Task> root = cq.from(Task.class);
-		Predicate p = cb.equal(  root.get( Task_.parent ), taskId );
-		p = cb.and( p, cb.isFalse( root.get(Task_.completed )));
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public List<String> listAllTaskIdsWithProject(String project) throws Exception {
-		if( StringUtils.isEmpty( project )  ){
-			return null;
-		}
-		EntityManager em = this.entityManagerContainer().get(Task.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<Task> root = cq.from(Task.class);
-		Predicate p = cb.equal(  root.get( Task_.project ), project );
-		cq.select( root.get(Task_.id ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-}

+ 0 - 138
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/TaskGroupFactory.java

@@ -1,138 +0,0 @@
-package com.x.teamwork.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.teamwork.assemble.control.AbstractFactory;
-import com.x.teamwork.assemble.control.Business;
-import com.x.teamwork.core.entity.TaskGroup;
-import com.x.teamwork.core.entity.TaskGroup_;
-
-
-public class TaskGroupFactory extends AbstractFactory {
-
-	public TaskGroupFactory( Business business ) throws Exception {
-		super(business);
-	}
-
-	/**
-	 * 获取指定Id的TaskGroup实体信息对象
-	 * @param id
-	 * @return
-	 * @throws Exception
-	 */
-	public TaskGroup get( String id ) throws Exception {
-		return this.entityManagerContainer().find( id, TaskGroup.class );
-	}
-	
-	/**
-	 * 列示指定Id的TaskGroup实体信息列表
-	 * @param ids
-	 * @return
-	 * @throws Exception
-	 */
-	public List<TaskGroup> list( List<String> ids ) throws Exception {
-		if( ids == null || ids.size() == 0 ){
-			return new ArrayList<TaskGroup>();
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskGroup.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskGroup> cq = cb.createQuery(TaskGroup.class);
-		Root<TaskGroup> root = cq.from(TaskGroup.class);
-		Predicate p = root.get(TaskGroup_.id).in(ids);
-		cq.orderBy( cb.desc( root.get( TaskGroup_.updateTime ) ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	/**
-	 * 根据用户列示TaskGroup实体信息列表
-	 * @param person
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listByPerson( String person ) throws Exception {
-		if( StringUtils.isEmpty( person ) ){
-			throw new Exception("person can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskGroup.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskGroup> root = cq.from(TaskGroup.class);
-		Predicate p = cb.equal( root.get(TaskGroup_.owner), person );
-		cq.select( root.get(TaskGroup_.id ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 根据用户列示TaskGroup实体信息列表
-	 * @param person
-	 * @return
-	 * @throws Exception
-	 */
-	public List<TaskGroup> listGroupByPerson( String person ) throws Exception {
-		if( StringUtils.isEmpty( person ) ){
-			throw new Exception("person can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskGroup.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskGroup> cq = cb.createQuery(TaskGroup.class);
-		Root<TaskGroup> root = cq.from(TaskGroup.class);
-		Predicate p = cb.equal( root.get(TaskGroup_.owner), person );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 根据用户和项目列示TaskGroup实体信息ID列表
-	 * @param person
-	 * @param project
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listByPersonAndProject( String person, String project ) throws Exception {
-		if( StringUtils.isEmpty( person ) ){
-			throw new Exception("person can not be empty!");
-		}
-		if( StringUtils.isEmpty( project ) ){
-			throw new Exception("project can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskGroup.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskGroup> root = cq.from(TaskGroup.class);
-		Predicate p = cb.equal( root.get(TaskGroup_.owner), person );
-		p = cb.and( p, cb.equal( root.get(TaskGroup_.project), project ) );
-		cq.select( root.get(TaskGroup_.id ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 根据用户和项目列示TaskGroup实体信息列表
-	 * @param person
-	 * @param project
-	 * @return
-	 * @throws Exception
-	 */
-	public List<TaskGroup> listGroupByPersonAndProject( String person, String project ) throws Exception {
-		if( StringUtils.isEmpty( person ) ){
-			throw new Exception("person can not be empty!");
-		}
-		if( StringUtils.isEmpty( project ) ){
-			throw new Exception("project can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskGroup.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskGroup> cq = cb.createQuery(TaskGroup.class);
-		Root<TaskGroup> root = cq.from(TaskGroup.class);
-		Predicate p = cb.equal( root.get(TaskGroup_.owner), person );
-		p = cb.and( p, cb.equal( root.get(TaskGroup_.project), project ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-}

+ 0 - 139
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/TaskGroupReleFactory.java

@@ -1,139 +0,0 @@
-package com.x.teamwork.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.exception.ExceptionWhen;
-import com.x.teamwork.assemble.control.AbstractFactory;
-import com.x.teamwork.assemble.control.Business;
-import com.x.teamwork.core.entity.TaskGroupRele;
-import com.x.teamwork.core.entity.TaskGroupRele_;
-
-
-public class TaskGroupReleFactory extends AbstractFactory {
-
-	public TaskGroupReleFactory( Business business ) throws Exception {
-		super(business);
-	}
-
-	/**
-	 * 获取指定Id的TaskGroupRele实体信息对象
-	 * @param id
-	 * @return
-	 * @throws Exception
-	 */
-	public TaskGroupRele get( String id ) throws Exception {
-		return this.entityManagerContainer().find( id, TaskGroupRele.class, ExceptionWhen.none );
-	}
-	
-	/**
-	 * 列示指定Id的TaskGroupRele实体信息列表
-	 * @param ids
-	 * @return
-	 * @throws Exception
-	 */
-	public List<TaskGroupRele> list( List<String> ids ) throws Exception {
-		if( ids == null || ids.size() == 0 ){
-			return new ArrayList<TaskGroupRele>();
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskGroupRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskGroupRele> cq = cb.createQuery(TaskGroupRele.class);
-		Root<TaskGroupRele> root = cq.from(TaskGroupRele.class);
-		Predicate p = root.get(TaskGroupRele_.id).in(ids);
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	/**
-	 * 根据项目组ID列示项目ID信息列表
-	 * @param group
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listTaskIdByGroup( String group ) throws Exception {
-		if( StringUtils.isEmpty( group ) ){
-			throw new Exception("group can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskGroupRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskGroupRele> root = cq.from(TaskGroupRele.class);
-		Predicate p = cb.equal( root.get(TaskGroupRele_.taskGroupId), group );
-		cq.select( root.get(TaskGroupRele_.taskId ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 根据项目组ID列示关联信息ID列表
-	 * @param group
-	 * @return
-	 * @throws Exception
-	 */
-	public List<String> listByGroup( String group ) throws Exception {
-		if( StringUtils.isEmpty( group ) ){
-			throw new Exception("group can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskGroupRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskGroupRele> root = cq.from(TaskGroupRele.class);
-		Predicate p = cb.equal( root.get(TaskGroupRele_.taskGroupId), group );
-		cq.select( root.get(TaskGroupRele_.id) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 根据项目组ID以及项目ID获取一个关联信息
-	 * @param group
-	 * @param project
-	 * @return
-	 * @throws Exception
-	 */
-	public List<TaskGroupRele> listWithGroupAndTask( String group, String taskId ) throws Exception {
-		if( StringUtils.isEmpty( group ) ){
-			throw new Exception("group can not be empty!");
-		}
-		if( StringUtils.isEmpty( taskId ) ){
-			throw new Exception("taskId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskGroupRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskGroupRele> cq = cb.createQuery(TaskGroupRele.class);
-		Root<TaskGroupRele> root = cq.from(TaskGroupRele.class);
-		Predicate p = cb.equal( root.get(TaskGroupRele_.taskGroupId), group );
-		p = cb.and( p,  cb.equal( root.get(TaskGroupRele_.taskId), taskId ));
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public List<TaskGroupRele> listTaskReleWithProject(String projectId ) throws Exception {
-		if( StringUtils.isEmpty( projectId ) ){
-			throw new Exception("projectId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskGroupRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskGroupRele> cq = cb.createQuery(TaskGroupRele.class);
-		Root<TaskGroupRele> root = cq.from(TaskGroupRele.class);
-		Predicate p = cb.equal( root.get(TaskGroupRele_.project), projectId );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	public List<TaskGroupRele> listTaskReleWithTask(String taskId ) throws Exception {
-		if( StringUtils.isEmpty( taskId ) ){
-			throw new Exception("taskId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskGroupRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskGroupRele> cq = cb.createQuery(TaskGroupRele.class);
-		Root<TaskGroupRele> root = cq.from(TaskGroupRele.class);
-		Predicate p = cb.equal( root.get(TaskGroupRele_.taskId), taskId );
-		return em.createQuery(cq.where(p)).getResultList();
-	}	
-}

+ 0 - 420
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/TaskListFactory.java

@@ -1,420 +0,0 @@
-package com.x.teamwork.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.exception.ExceptionWhen;
-import com.x.base.core.project.tools.ListTools;
-import com.x.teamwork.assemble.control.AbstractFactory;
-import com.x.teamwork.assemble.control.Business;
-import com.x.teamwork.core.entity.TaskList;
-import com.x.teamwork.core.entity.TaskListRele;
-import com.x.teamwork.core.entity.TaskListRele_;
-import com.x.teamwork.core.entity.TaskList_;
-
-
-public class TaskListFactory extends AbstractFactory {
-
-	public TaskListFactory( Business business ) throws Exception {
-		super(business);
-	}
-
-	/**
-	 * 获取指定Id的TaskList实体信息对象
-	 * @param id
-	 * @return
-	 * @throws Exception
-	 */
-	public TaskList get( String id ) throws Exception {
-		return this.entityManagerContainer().find( id, TaskList.class, ExceptionWhen.none );
-	}
-	
-	/**
-	 * 列示指定Id的TaskList实体信息列表
-	 * @param ids
-	 * @return
-	 * @throws Exception
-	 */
-	public List<TaskList> list( List<String> ids ) throws Exception {
-		if( ids == null || ids.size() == 0 ){
-			return new ArrayList<TaskList>();
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskList.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskList> cq = cb.createQuery(TaskList.class);
-		Root<TaskList> root = cq.from(TaskList.class);
-		Predicate p = root.get(TaskList_.id).in(ids);
-		cq.orderBy( cb.desc( root.get( TaskList_.updateTime ) ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 列示指定Id的TaskList实体信息列表
-	 * @param ids
-	 * @return
-	 * @throws Exception
-	 */
-	public List<TaskListRele> listRele( List<String> ids ) throws Exception {
-		if( ids == null || ids.size() == 0 ){
-			return new ArrayList<TaskListRele>();
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskListRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskListRele> cq = cb.createQuery(TaskListRele.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = root.get(TaskListRele_.id).in(ids);
-		cq.orderBy( cb.desc( root.get( TaskListRele_.updateTime ) ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	/**
-	 * 根据用户和项目ID查询工作任务列表(泳道)
-	 * @param person
-	 * @param projectId
-	 * @return
-	 * @throws Exception
-	 */
-	public List<TaskList> listWithPersonAndProject( String person, String projectId ) throws Exception {
-		if( StringUtils.isEmpty( person ) ){
-			throw new Exception("person can not be empty!");
-		}
-		if( StringUtils.isEmpty( projectId ) ){
-			throw new Exception("projectId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskList.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskList> cq = cb.createQuery(TaskList.class);
-		Root<TaskList> root = cq.from(TaskList.class);
-		Predicate p = cb.equal( root.get(TaskList_.owner ), person );
-		p = cb.and( p, cb.equal( root.get(TaskList_.project), projectId ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	/**
-	 * 根据列表ID获取所有的工作任务关联ID列表
-	 * @param listId
-	 * @return
-	 * @throws Exception 
-	 */
-	public List<String> listReleIdsWithListId(String listId ) throws Exception {
-		if( StringUtils.isEmpty( listId ) ){
-			throw new Exception("listId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskListRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = cb.equal( root.get(TaskListRele_.taskListId), listId );
-		cq.select( root.get(TaskListRele_.id ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 根据列表ID获取所有的工作任务关联信息列表
-	 * @param listId
-	 * @return
-	 * @throws Exception 
-	 */
-	public List<TaskListRele> listReleWithListId( String listId ) throws Exception {
-		if( StringUtils.isEmpty( listId ) ){
-			throw new Exception("listId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskListRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskListRele> cq = cb.createQuery(TaskListRele.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = cb.equal( root.get(TaskListRele_.taskListId), listId );
-		cq.orderBy( cb.asc( root.get( TaskListRele_.order ) ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	/**
-	 * 根据任务ID和列表ID查询工作列表关联对象
-	 * @param taskId
-	 * @param listId
-	 * @return
-	 * @throws Exception 
-	 */
-	public List<TaskListRele> listReleWithTaskAndList(String taskId, String listId) throws Exception {
-		if( StringUtils.isEmpty( taskId ) ){
-			throw new Exception("taskId can not be empty!");
-		}
-		if( StringUtils.isEmpty( listId ) ){
-			throw new Exception("listId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskListRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskListRele> cq = cb.createQuery(TaskListRele.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = cb.equal( root.get(TaskListRele_.taskId), taskId );
-		p = cb.and( p, cb.equal( root.get(TaskListRele_.taskListId), listId ));
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 根据任务ID查询工作列表关联对象
-	 * @param taskId
-	 * @return
-	 * @throws Exception 
-	 */
-	public List<TaskListRele> listReleWithTask(String taskId ) throws Exception {
-		if( StringUtils.isEmpty( taskId ) ){
-			throw new Exception("taskId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskListRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskListRele> cq = cb.createQuery(TaskListRele.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = cb.equal( root.get(TaskListRele_.taskId), taskId );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	/**
-	 * 根据任务ID查询工作列表关联对象
-	 * @param taskId
-	 * @return
-	 * @throws Exception 
-	 */
-	public List<String> listGroupIdsWithTask( String taskId ) throws Exception {
-		if( StringUtils.isEmpty( taskId ) ){
-			throw new Exception("taskId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskListRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = cb.equal( root.get(TaskListRele_.taskId), taskId );
-		cq.distinct(true).select( root.get(TaskListRele_.taskGroupId ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public Integer maxListOrder(String groupId ) throws Exception {
-		if( StringUtils.isEmpty( groupId ) ){
-			throw new Exception("groupId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskList.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Integer> cq = cb.createQuery(Integer.class);
-		Root<TaskList> root = cq.from(TaskList.class);
-		Predicate p = cb.equal( root.get(TaskList_.taskGroup ), groupId );
-		cq.select( cb.max( root.get( TaskList_.order )));
-		Integer max = em.createQuery(cq.where(p)).getSingleResult();
-		return max == null ? 0 : max;
-	}
-
-	public Integer maxTaskOrder(String listId) throws Exception {
-		if( StringUtils.isEmpty( listId ) ){
-			throw new Exception("listId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskListRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Integer> cq = cb.createQuery(Integer.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = cb.equal( root.get(TaskListRele_.taskListId), listId );
-		cq.select( cb.max( root.get( TaskListRele_.order )));
-		Integer max = em.createQuery(cq.where(p)).getSingleResult();
-		return max == null ? 0 : max;
-	}
-
-	public List<TaskList> listWithTaskGroup(String taskGroupId) throws Exception {
-		if( StringUtils.isEmpty( taskGroupId ) ){
-			throw new Exception("taskGroupId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskList.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskList> cq = cb.createQuery(TaskList.class);
-		Root<TaskList> root = cq.from(TaskList.class);
-		Predicate p = cb.equal( root.get(TaskList_.taskGroup ), taskGroupId );
-		cq.orderBy( cb.asc( root.get( TaskList_.order ) ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	public List<String> listTaskListIdsWithTaskGroup(String taskGroupId) throws Exception {
-		if( StringUtils.isEmpty( taskGroupId ) ){
-			throw new Exception("taskGroupId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskListRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = cb.equal( root.get(TaskListRele_.taskGroupId ), taskGroupId );
-		cq.select( root.get(TaskListRele_.taskListId ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public List<String> listTaskIdsWithTaskGroupId(String taskGroupId) throws Exception {
-		if( StringUtils.isEmpty( taskGroupId ) ){
-			throw new Exception("taskGroupId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get( TaskListRele.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = cb.equal( root.get(TaskListRele_.taskGroupId ), taskGroupId );
-		cq.distinct(true).select( root.get(TaskListRele_.taskId ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	public List<String> listTaskIdsWithTaskGroupId( List<String> taskLists ) throws Exception {
-		if( ListTools.isEmpty( taskLists ) ){
-			return null;
-		}
-		EntityManager em = this.entityManagerContainer().get( TaskListRele.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p =  root.get(TaskListRele_.taskListId ).in( taskLists );
-		cq.distinct(true).select( root.get(TaskListRele_.taskId ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	public Long countTaskWithTaskListId(String taskListId) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( TaskListRele.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Long> cq = cb.createQuery(Long.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = cb.equal( root.get(TaskListRele_.taskListId ), taskListId );
-		cq.select(cb.count(root)).where(p);
-		return em.createQuery(cq).getSingleResult();
-	}
-	
-	public List<String> listTaskIdWithTaskListId(String taskListId) throws Exception {
-		if( StringUtils.isEmpty( taskListId ) ){
-			return null;
-		}
-		EntityManager em = this.entityManagerContainer().get( TaskListRele.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = cb.equal( root.get(TaskListRele_.taskListId ), taskListId );
-		cq.select( root.get(TaskListRele_.taskId ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	public List<String> listTaskIdWithTaskListIds( List<String> taskListIds ) throws Exception {
-		if(ListTools.isEmpty( taskListIds ) ){
-			return null;
-		}
-		EntityManager em = this.entityManagerContainer().get( TaskListRele.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = root.get(TaskListRele_.taskListId ).in( taskListIds );
-		cq.select( root.get(TaskListRele_.taskId ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	public List<String> listTaskIdWithTaskListId( List<String> taskListId) throws Exception {
-		if( ListTools.isEmpty( taskListId ) ){
-			throw new Exception("taskListId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get( TaskListRele.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = root.get(TaskListRele_.taskListId ).in( taskListId );
-		cq.select( root.get(TaskListRele_.taskId ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	public List<TaskListRele> listReleWithTaskAndGroup( String taskId, String taskGroupId) throws Exception {
-		if( StringUtils.isEmpty( taskGroupId ) ){
-			throw new Exception("taskGroupId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskListRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskListRele> cq = cb.createQuery(TaskListRele.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = cb.equal( root.get(TaskListRele_.taskId ), taskId );
-		p = cb.and( p, cb.equal( root.get(TaskListRele_.taskGroupId ) , taskGroupId));
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	public List<String> listTaskListIdWithTaskAndGroup( String taskId, String taskGroupId ) throws Exception {
-		if( StringUtils.isEmpty( taskGroupId ) ){
-			throw new Exception("taskGroupId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskListRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = cb.equal( root.get(TaskListRele_.taskId ), taskId );
-		p = cb.and( p, cb.equal( root.get(TaskListRele_.taskGroupId ) , taskGroupId));
-		cq.select( root.get(TaskListRele_.taskListId) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public List<TaskListRele> listTaskListWithTask(String taskId, String taskGroupId ) throws Exception {
-		if( StringUtils.isEmpty( taskId ) ){
-			return null;
-		}
-		if( StringUtils.isEmpty( taskGroupId ) ){
-			return null;
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskListRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskListRele> cq = cb.createQuery(TaskListRele.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = cb.equal( root.get(TaskListRele_.taskId ), taskId );
-		p = cb.and( p, cb.equal( root.get(TaskListRele_.taskGroupId ), taskGroupId ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public List<String> listTaskListIdWithTask(String taskId, String taskGroupId ) throws Exception {
-		if( StringUtils.isEmpty( taskId ) ){
-			return null;
-		}
-		if( StringUtils.isEmpty( taskGroupId ) ){
-			return null;
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskListRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = cb.equal( root.get(TaskListRele_.taskId ), taskId );
-		p = cb.and( p, cb.equal( root.get(TaskListRele_.taskGroupId ), taskGroupId ) );
-		cq.select( root.get(TaskListRele_.taskListId) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public List<String> listTaskListIdsWithGroup(String taskGroupId, String person) throws Exception {
-		if( StringUtils.isEmpty( taskGroupId ) ){
-			return null;
-		}
-		if( StringUtils.isEmpty( person ) ){
-			return null;
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskList.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskList> root = cq.from(TaskList.class);
-		Predicate p = cb.equal( root.get( TaskList_.owner ), person );
-		p = cb.and( p, cb.equal( root.get( TaskList_.taskGroup ), taskGroupId ) );
-		cq.select( root.get(TaskList_.id) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public List<TaskListRele> listReleWithTaskAndListId(List<String> taskIds, String taskListId) throws Exception {
-		if( ListTools.isEmpty( taskIds ) ){
-			return null;
-		}
-		if( StringUtils.isEmpty( taskListId ) ){
-			return null;
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskListRele.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskListRele> cq = cb.createQuery(TaskListRele.class);
-		Root<TaskListRele> root = cq.from(TaskListRele.class);
-		Predicate p = cb.equal( root.get(TaskListRele_.taskListId ), taskListId );
-		p = cb.and( p, root.get(TaskListRele_.taskId ).in( taskIds ) );
-		cq.orderBy( cb.asc( root.get( TaskListRele_.order ) ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-}

+ 0 - 124
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/TaskTagFactory.java

@@ -1,124 +0,0 @@
-package com.x.teamwork.assemble.control.factory;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.teamwork.assemble.control.AbstractFactory;
-import com.x.teamwork.assemble.control.Business;
-import com.x.teamwork.core.entity.TaskTag;
-import com.x.teamwork.core.entity.TaskTagRele;
-import com.x.teamwork.core.entity.TaskTagRele_;
-import com.x.teamwork.core.entity.TaskTag_;
-import com.x.teamwork.core.entity.tools.CriteriaBuilderTools;
-
-
-public class TaskTagFactory extends AbstractFactory {
-
-	public TaskTagFactory( Business business ) throws Exception {
-		super(business);
-	}
-
-	public List<String> listTagIdsWithTask(String taskId, String person) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( TaskTagRele.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskTagRele> root = cq.from(TaskTagRele.class);
-		Predicate p = cb.equal( root.get( TaskTagRele_.taskId ), taskId );
-		p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal( root.get( TaskTagRele_.owner ), person ) );
-		cq.select( root.get(TaskTagRele_.tagId) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	/**
-	 * 根据标签名称,项目ID,人员标识查询该标签在用户的项目标签中的标签ID,理论上只有一条记录
-	 * @param tagName
-	 * @param project
-	 * @param distinguishedName
-	 * @return
-	 * @throws Exception 
-	 */
-	public List<String> listTagIdsWithTagNameAndProjectAndPerson(String tagName, String project, String personName) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( TaskTagRele.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskTag> root = cq.from(TaskTag.class);
-		Predicate p = cb.equal( root.get( TaskTag_.tag ), tagName );
-		p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal( root.get( TaskTag_.owner ), personName ) );
-		if( StringUtils.isNotEmpty( project )) {
-			p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal( root.get( TaskTag_.project ), project ) );
-		}
-		cq.select( root.get(TaskTag_.id) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	/**
-	 * 根据标签ID、任务ID和人员名称查询标签与任务的关联信息
-	 * @param tagId
-	 * @param taskId
-	 * @param personName
-	 * @return
-	 * @throws Exception 
-	 */
-	public List<String> listTagReleIdsWithTagIdAndTaskAndPerson(String tagId, String taskId, String personName) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( TaskTagRele.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskTagRele> root = cq.from(TaskTagRele.class);
-		Predicate p = cb.equal( root.get( TaskTagRele_.taskId ), taskId );
-		p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal( root.get( TaskTagRele_.tagId ), tagId ) );
-		p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal( root.get( TaskTagRele_.owner ), personName ) );
-		cq.select( root.get(TaskTagRele_.id) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public List<TaskTag> listWithProjectAndPerson( String project, String person ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( TaskTag.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskTag> cq = cb.createQuery(TaskTag.class);
-		Root<TaskTag> root = cq.from(TaskTag.class);
-		Predicate p = cb.equal( root.get( TaskTag_.project ), project );
-		p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal( root.get( TaskTag_.owner ), person ) );
-		cq.orderBy( cb.asc( root.get( TaskTag_.createTime ) )  );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	public List<TaskTagRele> listReleWithProjectAndPerson( String projectId, String person ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( TaskTagRele.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskTagRele> cq = cb.createQuery(TaskTagRele.class);
-		Root<TaskTagRele> root = cq.from(TaskTagRele.class);
-		Predicate p = cb.equal( root.get( TaskTagRele_.project ), projectId );
-		p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal( root.get( TaskTagRele_.owner ), person ) );
-		cq.orderBy( cb.asc( root.get( TaskTagRele_.createTime ) )  );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	public List<TaskTagRele> listReleWithTaskAndPerson( String taskId, String person ) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( TaskTagRele.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskTagRele> cq = cb.createQuery(TaskTagRele.class);
-		Root<TaskTagRele> root = cq.from(TaskTagRele.class);
-		Predicate p = cb.equal( root.get( TaskTagRele_.taskId ), taskId );
-		p = CriteriaBuilderTools.predicate_and( cb, p, cb.equal( root.get( TaskTagRele_.owner ), person ) );
-		cq.orderBy( cb.asc( root.get( TaskTagRele_.createTime ) )  );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	public List<String> listTaskIdsWithReleTagIds(List<String> tagIds) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( TaskTagRele.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<String> cq = cb.createQuery(String.class);
-		Root<TaskTagRele> root = cq.from(TaskTagRele.class);
-		Predicate p = root.get( TaskTagRele_.tagId ).in( tagIds );
-		cq.select( root.get(TaskTagRele_.taskId) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-}

+ 0 - 122
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/factory/TaskViewFactory.java

@@ -1,122 +0,0 @@
-package com.x.teamwork.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.Order;
-import javax.persistence.criteria.Predicate;
-import javax.persistence.criteria.Root;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.project.exception.ExceptionWhen;
-import com.x.base.core.project.tools.ListTools;
-import com.x.teamwork.assemble.control.AbstractFactory;
-import com.x.teamwork.assemble.control.Business;
-import com.x.teamwork.core.entity.TaskView;
-import com.x.teamwork.core.entity.TaskView_;
-import com.x.teamwork.core.entity.tools.CriteriaBuilderTools;
-import com.x.teamwork.core.entity.tools.filter.QueryFilter;
-
-
-public class TaskViewFactory extends AbstractFactory {
-
-	public TaskViewFactory( Business business ) throws Exception {
-		super(business);
-	}
-
-	/**
-	 * 获取指定Id的TaskView实体信息对象
-	 * @param id
-	 * @return
-	 * @throws Exception
-	 */
-	public TaskView get( String id ) throws Exception {
-		return this.entityManagerContainer().find( id, TaskView.class, ExceptionWhen.none );
-	}
-	
-	/**
-	 * 列示指定Id的TaskView实体信息列表
-	 * @param ids
-	 * @return
-	 * @throws Exception
-	 */
-	public List<TaskView> list( List<String> ids ) throws Exception {
-		if( ids == null || ids.size() == 0 ){
-			return new ArrayList<TaskView>();
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskView.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskView> cq = cb.createQuery(TaskView.class);
-		Root<TaskView> root = cq.from(TaskView.class);
-		Predicate p = root.get(TaskView_.id).in(ids);
-		cq.orderBy( cb.desc( root.get( TaskView_.updateTime ) ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-
-	/**
-	 * 根据用户和项目ID查询工作任务列表
-	 * @param person
-	 * @param projectId
-	 * @return
-	 * @throws Exception
-	 */
-	public List<TaskView> listWithPersonAndProject( String person, String projectId ) throws Exception {
-		if( StringUtils.isEmpty( person ) ){
-			throw new Exception("person can not be empty!");
-		}
-		if( StringUtils.isEmpty( projectId ) ){
-			throw new Exception("projectId can not be empty!");
-		}
-		EntityManager em = this.entityManagerContainer().get(TaskView.class);
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskView> cq = cb.createQuery(TaskView.class);
-		Root<TaskView> root = cq.from(TaskView.class);
-		Predicate p = cb.equal( root.get(TaskView_.owner ), person );
-		p = cb.and( p, cb.equal( root.get(TaskView_.project), projectId ) );
-		return em.createQuery(cq.where(p)).getResultList();
-	}
-	
-	public Long countWithFilter( QueryFilter queryFilter) throws Exception {
-		if( queryFilter == null  ) {
-			return 0L;
-		}
-		EntityManager em = this.entityManagerContainer().get( TaskView.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<Long> cq = cb.createQuery(Long.class);
-		Root<TaskView> root = cq.from(TaskView.class);
-		Predicate p = CriteriaBuilderTools.composePredicateWithQueryFilter( TaskView_.class, cb, null, root, queryFilter );
-		cq.select(cb.count(root)).where(p);
-		return em.createQuery(cq).getSingleResult();
-	}
-	
-	public List<TaskView> listWithFilter( Integer maxCount, String orderField, String orderType, QueryFilter queryFilter) throws Exception {
-		EntityManager em = this.entityManagerContainer().get( TaskView.class );
-		CriteriaBuilder cb = em.getCriteriaBuilder();
-		CriteriaQuery<TaskView> cq = cb.createQuery(TaskView.class);
-		Root<TaskView> root = cq.from(TaskView.class);
-		Predicate p = CriteriaBuilderTools.composePredicateWithQueryFilter( TaskView_.class, cb, null, root, queryFilter );
-		
-		//排序,添加排序列,默认使用sequence
-		List<Order> orders = new ArrayList<>();
-		Order orderWithField = CriteriaBuilderTools.getOrder( cb, root, TaskView_.class, orderField, orderType );
-		if( orderWithField != null ){
-			orders.add( orderWithField );
-		}
-		
-		if( !TaskView.sequence_FIELDNAME.equalsIgnoreCase( orderField )) {
-			//如果是其他的列,很可能排序值不唯一,所以使用多一列排序列来确定每次查询的顺序
-			orderWithField = CriteriaBuilderTools.getOrder( cb, root, TaskView_.class, TaskView.id_FIELDNAME, orderType );
-			if( orderWithField != null ){
-				orders.add( orderWithField );
-			}
-		}		
-		if( ListTools.isNotEmpty(  orders )){
-			cq.orderBy( orders );
-		}
-		return em.createQuery(cq.where(p)).setMaxResults( maxCount).getResultList();
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/JaxrsCipherManagerFilter.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs;
-
-import javax.servlet.annotation.WebFilter;
-
-import com.x.base.core.project.jaxrs.CipherManagerJaxrsFilter;
-
-@WebFilter(urlPatterns = { 
-		"/jaxrs/cipher/*",
-		"/jaxrs/manager/*" 
-		}, asyncSupported = true)
-public class JaxrsCipherManagerFilter extends CipherManagerJaxrsFilter {
-}

+ 0 - 129
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ActionDelete.java

@@ -1,129 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-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.entity.JpaObject;
-import com.x.base.core.entity.annotation.CheckRemoveType;
-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.config.StorageMapping;
-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.teamwork.assemble.control.ThisApplication;
-import com.x.teamwork.core.entity.Attachment;
-import com.x.teamwork.core.entity.Dynamic;
-
-public class ActionDelete extends BaseAction {
-
-	private static  Logger logger = LoggerFactory.getLogger( ActionDelete.class );
-	
-	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id ) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		Attachment attachment = null;
-		StorageMapping mapping = null;
-		Dynamic dynamic = null;
-		Wo wo = new Wo();
-		Boolean check = true;	
-		
-		if( StringUtils.isEmpty( id ) ){
-			check = false;
-			Exception exception = new ExceptionAttachmentIdEmpty();
-			result.error( exception );
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try{
-				attachment = attachmentQueryService.get( id );
-				if (null == attachment) {
-					check = false;
-					Exception exception = new ExceptionAttachmentNotExists( id );
-					result.error( exception );
-				}
-			}catch(Exception e){
-				check = false;
-				Exception exception = new ExceptionAttachmentQueryById( e, id );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try (EntityManagerContainer emc = EntityManagerContainerFactory.instance().create()) {
-				mapping = ThisApplication.context().storageMappings().get(Attachment.class, attachment.getStorage());
-				
-				attachment = emc.find( id, Attachment.class );
-				emc.beginTransaction( Attachment.class );
-				emc.remove( attachment, CheckRemoveType.all );
-				attachment.deleteContent( mapping );
-				emc.commit();
-
-				
-				
-				
-			}catch(Exception e){
-				check = false;
-				Exception exception = new ExceptionAttachmentDelete( e, attachment.getId() );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				dynamic = dynamicPersistService.deleteAttachment( attachment, effectivePerson );
-				if( dynamic != null ) {
-					List<WoDynamic> dynamics = new ArrayList<>();
-					dynamics.add( WoDynamic.copier.copy( dynamic ) );
-					wo.setDynamics(dynamics);
-				}
-			} catch (Exception e) {
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		wo.setId( id );
-		result.setData( wo );
-		return result;
-	}
-	
-	public static class Wo extends WoId {
-		
-		@FieldDescribe("操作引起的动态内容")
-		List<WoDynamic> dynamics = new ArrayList<>();
-
-		public List<WoDynamic> getDynamics() {
-			return dynamics;
-		}
-
-		public void setDynamics(List<WoDynamic> dynamics) {
-			this.dynamics = dynamics;
-		}
-	}
-	
-	public static class WoDynamic extends Dynamic{
-
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static WrapCopier<Dynamic, WoDynamic> copier = WrapCopierFactory.wo( Dynamic.class, WoDynamic.class, null, JpaObject.FieldsInvisible);
-		
-		private Long rank = 0L;
-
-		public Long getRank() {
-			return rank;
-		}
-
-		public void setRank(Long rank) {
-			this.rank = rank;
-		}		
-	}
-}

+ 0 - 104
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ActionDownload.java

@@ -1,104 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-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.config.StorageMapping;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoFile;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.teamwork.assemble.control.ThisApplication;
-import com.x.teamwork.core.entity.Attachment;
-import com.x.teamwork.core.entity.Dynamic;
-
-public class ActionDownload extends BaseAction {
-	
-	private static  Logger logger = LoggerFactory.getLogger( ActionDownload.class );
-	
-	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id ) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		Attachment attachment = null;
-		Boolean check = true;
-		Wo wo = null;
-		try {
-			attachment = attachmentQueryService.get( id );
-			if( attachment == null ){
-				check = false;
-				Exception exception = new ExceptionAttachmentNotExists( id );
-				result.error( exception );
-			}
-		} catch ( Exception e ) {
-			check = false;
-			Exception exception = new ExceptionAttachmentQueryById( e, id );
-			result.error( exception );
-			logger.error( e, effectivePerson, request, null);
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			StorageMapping mapping = ThisApplication.context().storageMappings().get(Attachment.class, attachment.getStorage());
-			wo = new Wo(attachment.readContent(mapping), 
-					this.contentType(false, attachment.getName()), 
-					this.contentDisposition(false, attachment.getName()));
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				Dynamic dynamic = dynamicPersistService.downloadAttachmentDynamic(attachment, effectivePerson);
-				if( dynamic != null ) {
-					List<WoDynamic> dynamics = new ArrayList<>();
-					dynamics.add( WoDynamic.copier.copy( dynamic ) );
-					if( wo != null ) {
-						wo.setDynamics(dynamics);
-					}
-				}
-			} catch (Exception e) {
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		result.setData(wo);
-		return result;
-	}
-
-	public static class Wo extends WoFile {
-		
-		@FieldDescribe("操作引起的动态内容")
-		List<WoDynamic> dynamics = new ArrayList<>();
-
-		public List<WoDynamic> getDynamics() {
-			return dynamics;
-		}
-
-		public void setDynamics(List<WoDynamic> dynamics) {
-			this.dynamics = dynamics;
-		}
-		
-		public Wo(byte[] bytes, String contentType, String contentDisposition) {
-			super(bytes, contentType, contentDisposition);
-		}
-	}
-
-	public static class WoDynamic extends Dynamic{
-
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static WrapCopier<Dynamic, WoDynamic> copier = WrapCopierFactory.wo( Dynamic.class, WoDynamic.class, null, JpaObject.FieldsInvisible);
-		
-		private Long rank = 0L;
-
-		public Long getRank() {
-			return rank;
-		}
-
-		public void setRank(Long rank) {
-			this.rank = rank;
-		}		
-	}
-}

+ 0 - 105
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ActionDownloadStream.java

@@ -1,105 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-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.config.StorageMapping;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoFile;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.teamwork.assemble.control.ThisApplication;
-import com.x.teamwork.core.entity.Attachment;
-import com.x.teamwork.core.entity.Dynamic;
-
-public class ActionDownloadStream extends BaseAction {
-	
-	private static  Logger logger = LoggerFactory.getLogger( ActionDownloadStream.class );
-	
-	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id, Boolean stream ) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		Attachment attachment = null;
-		Boolean check = true;
-		Wo wo = null;
-		try {
-			attachment = attachmentQueryService.get( id );
-			if( attachment == null ){
-				check = false;
-				Exception exception = new ExceptionAttachmentNotExists( id );
-				result.error( exception );
-			}
-		} catch ( Exception e ) {
-			check = false;
-			Exception exception = new ExceptionAttachmentQueryById( e, id );
-			result.error( exception );
-			logger.error( e, effectivePerson, request, null);
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			StorageMapping mapping = ThisApplication.context().storageMappings().get(Attachment.class, attachment.getStorage());
-			wo = new Wo(attachment.readContent(mapping), 
-					this.contentType(stream, attachment.getName()), 
-					this.contentDisposition(stream, attachment.getName()));
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				Dynamic dynamic = dynamicPersistService.downloadAttachmentDynamic(attachment, effectivePerson);
-				if( dynamic != null ) {
-					List<WoDynamic> dynamics = new ArrayList<>();
-					dynamics.add( WoDynamic.copier.copy( dynamic ) );
-					if( wo != null ) {
-						wo.setDynamics(dynamics);
-					}
-				}
-			} catch (Exception e) {
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		result.setData(wo);
-		return result;
-	}
-
-	public static class Wo extends WoFile {
-		
-		@FieldDescribe("操作引起的动态内容")
-		List<WoDynamic> dynamics = new ArrayList<>();
-
-		public List<WoDynamic> getDynamics() {
-			return dynamics;
-		}
-
-		public void setDynamics(List<WoDynamic> dynamics) {
-			this.dynamics = dynamics;
-		}
-		
-		public Wo(byte[] bytes, String contentType, String contentDisposition) {
-			super(bytes, contentType, contentDisposition);
-		}
-	}
-
-	public static class WoDynamic extends Dynamic{
-
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static WrapCopier<Dynamic, WoDynamic> copier = WrapCopierFactory.wo( Dynamic.class, WoDynamic.class, null, JpaObject.FieldsInvisible);
-		
-		private Long rank = 0L;
-
-		public Long getRank() {
-			return rank;
-		}
-
-		public void setRank(Long rank) {
-			this.rank = rank;
-		}		
-	}
-	
-}

+ 0 - 63
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ActionGet.java

@@ -1,63 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.entity.JpaObject;
-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.teamwork.core.entity.Attachment;
-
-public class ActionGet extends BaseAction {
-
-	private static  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;
-		Attachment attachment = null;
-		if( StringUtils.isEmpty( id )){
-			Exception exception = new ExceptionAttachmentIdEmpty();
-			result.error( exception );
-		}else{
-			try {
-				attachment = attachmentQueryService.get( id );
-				if( attachment != null ){
-					wrap = Wo.copier.copy( attachment );
-					result.setData(wrap);
-				}else{
-					Exception exception = new ExceptionAttachmentNotExists( id );
-					result.error( exception );
-				}
-			} catch ( Exception e ) {
-				Exception exception = new ExceptionAttachmentQueryById( e, id );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		return result;
-	}
-	
-	public static class Wo extends Attachment{
-
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static WrapCopier<Attachment, Wo> copier = WrapCopierFactory.wo( Attachment.class, Wo.class, null, JpaObject.FieldsInvisible);
-		
-		private Long rank = 0L;
-
-		public Long getRank() {
-			return rank;
-		}
-
-		public void setRank(Long rank) {
-			this.rank = rank;
-		}
-		
-	}
-}

+ 0 - 72
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ActionListWithProject.java

@@ -1,72 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.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.teamwork.core.entity.Attachment;
-import com.x.teamwork.core.entity.Project;
-
-public class ActionListWithProject extends BaseAction {
-
-	private static  Logger logger = LoggerFactory.getLogger( ActionListWithProject.class );
-	
-	protected ActionResult<List<Wo>> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id ) throws Exception {
-		ActionResult<List<Wo>> result = new ActionResult<List<Wo>>();
-		List<Wo> wrapOutAttachmentList = null;
-		List<Attachment> attachments = null;
-		Project project = null;
-		if( StringUtils.isEmpty( id )){
-			Exception exception = new ExceptionProjectIdEmpty();
-			result.error( exception );
-		}else{
-			try {	
-				project = projectQueryService.get( id );
-				if( project != null ){
-					attachments = attachmentQueryService.listAttachmentWithProject(id );
-					if( ListTools.isNotEmpty( attachments)) {
-						wrapOutAttachmentList = Wo.copier.copy( attachments );
-					}
-				}
-			} catch (Exception e) {
-				Exception exception = new ExceptionQueryProjectById( e, id );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-			if( wrapOutAttachmentList == null ){
-				wrapOutAttachmentList = new ArrayList<Wo>();
-			}
-			result.setData( wrapOutAttachmentList );
-		}
-		return result;
-	}
-	
-	public static class Wo extends Attachment{
-
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static WrapCopier<Attachment, Wo> copier = WrapCopierFactory.wo( Attachment.class, Wo.class, null,JpaObject.FieldsInvisible);
-		
-		private Long rank = 0L;
-
-		public Long getRank() {
-			return rank;
-		}
-
-		public void setRank(Long rank) {
-			this.rank = rank;
-		}
-		
-	}
-}

+ 0 - 72
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ActionListWithTask.java

@@ -1,72 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.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.teamwork.core.entity.Attachment;
-import com.x.teamwork.core.entity.Task;
-
-public class ActionListWithTask extends BaseAction {
-
-	private static  Logger logger = LoggerFactory.getLogger( ActionListWithTask.class );
-	
-	protected ActionResult<List<Wo>> execute( HttpServletRequest request, EffectivePerson effectivePerson, String taskId ) throws Exception {
-		ActionResult<List<Wo>> result = new ActionResult<List<Wo>>();
-		List<Wo> wrapOutAttachmentList = null;
-		List<Attachment> attachments = null;
-		Task task = null;
-		if( StringUtils.isEmpty( taskId )){
-			Exception exception = new ExceptionProjectIdEmpty();
-			result.error( exception );
-		}else{
-			try {	
-				task = taskQueryService.get( taskId );
-				if( task != null ){
-					attachments = attachmentQueryService.listAttachmentWithTask(taskId);
-					if( ListTools.isNotEmpty( attachments)) {
-						wrapOutAttachmentList = Wo.copier.copy( attachments );
-					}
-				}
-			} catch (Exception e) {
-				Exception exception = new ExceptionQueryProjectById( e, taskId );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-			if( wrapOutAttachmentList == null ){
-				wrapOutAttachmentList = new ArrayList<Wo>();
-			}
-			result.setData( wrapOutAttachmentList );
-		}
-		return result;
-	}
-	
-	public static class Wo extends Attachment{
-
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static WrapCopier<Attachment, Wo> copier = WrapCopierFactory.wo( Attachment.class, Wo.class, null,JpaObject.FieldsInvisible);
-		
-		private Long rank = 0L;
-
-		public Long getRank() {
-			return rank;
-		}
-
-		public void setRank(Long rank) {
-			this.rank = rank;
-		}
-		
-	}
-}

+ 0 - 185
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ActionProjectAttachmentUpload.java

@@ -1,185 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.UUID;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.io.FilenameUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
-
-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.config.StorageMapping;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoId;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.base.core.project.tools.DefaultCharset;
-import com.x.teamwork.assemble.control.ThisApplication;
-import com.x.teamwork.core.entity.Attachment;
-import com.x.teamwork.core.entity.Dynamic;
-import com.x.teamwork.core.entity.Project;
-
-public class ActionProjectAttachmentUpload extends BaseAction {
-	
-	private static Logger logger = LoggerFactory.getLogger(ActionProjectAttachmentUpload.class);
-
-	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, 
-			String projectId, String site, byte[] bytes, FormDataContentDisposition disposition) {
-		ActionResult<Wo> result = new ActionResult<>();
-		Attachment attachment = null;
-		Project project = null;
-		StorageMapping mapping = null;
-		String fileName = null;
-		Boolean check = true;		
-		Wo wo = new Wo();
-		
-		if( Boolean.TRUE.equals( check ) ){
-			if( StringUtils.isEmpty( projectId ) ){
-				check = false;
-				Exception exception = new ExceptionProjectIdEmpty( );
-				result.error( exception );
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){//判断工作信息是否已经存在
-			try {
-				project = projectQueryService.get( projectId );
-				if (null == project) {
-					check = false;
-					Exception exception = new ExceptionProjectNotExists( projectId );
-					result.error( exception );
-				}
-			} catch (Exception e) {
-				check = false;
-				result.error( e );
-				logger.error( e, effectivePerson, request, null );
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				fileName = FilenameUtils.getName(new String(disposition.getFileName().getBytes(DefaultCharset.name_iso_8859_1), DefaultCharset.name));
-				/** 禁止不带扩展名的文件上传 */
-				if (StringUtils.isEmpty(fileName)) {
-					check = false;
-					Exception exception = new ExceptionEmptyExtension( fileName );
-					result.error( exception );
-				} 
-			} catch (Exception e) {
-				check = false;
-				result.error( e );
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				mapping = ThisApplication.context().storageMappings().random( Attachment.class );
-			} catch (Exception e) {
-				check = false;
-				result.error( e );
-				logger.warn( "系统在获取存储的时候发生异常!" );
-				logger.error( e, effectivePerson, request, null );
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				attachment = this.concreteAttachment( mapping, project, fileName, effectivePerson, site );
-				attachment.saveContent(mapping, bytes, fileName);
-				attachment = attachmentPersistService.saveAttachment( project, attachment );
-				
-				
-				wo.setId( attachment.getId() );
-				
-			} catch (Exception e) {
-				check = false;
-				result.error( e );
-				logger.warn( "系统在保存附件和更新附件数据时候发生异常!" );
-				logger.error( e, effectivePerson, request, null );
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				Dynamic dynamic = dynamicPersistService.uploadAttachmentDynamic(attachment, effectivePerson);
-				if( dynamic != null ) {
-					List<WoDynamic> dynamics = new ArrayList<>();
-					dynamics.add( WoDynamic.copier.copy( dynamic ) );
-					wo.setDynamics(dynamics);
-				}
-			} catch (Exception e) {
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		result.setData(wo);
-		return result;
-	}
-
-	private Attachment concreteAttachment(StorageMapping mapping, Project project, String name, EffectivePerson effectivePerson, String site) throws Exception {
-		Attachment attachment = new Attachment();
-		String fileName = UUID.randomUUID().toString();
-		String extension = FilenameUtils.getExtension( name );
-		if ( StringUtils.isNotEmpty(extension)) {
-			fileName = fileName + "." + extension;
-		}else{
-			throw new Exception("file extension is empty.");
-		}
-		if( name.indexOf( "\\" ) >0 ){
-			name = StringUtils.substringAfterLast( name, "\\");
-		}
-		if( name.indexOf( "/" ) >0 ){
-			name = StringUtils.substringAfterLast( name, "/");
-		}
-		attachment.setCreateTime( new Date() );
-		attachment.setLastUpdateTime( new Date() );
-		attachment.setExtension( extension );
-		attachment.setName( name );
-		attachment.setFileName( fileName );
-		attachment.setStorage( mapping.getName() );
-		attachment.setProjectId( project.getId() );
-		attachment.setBundleObjType("PROJECT") ;
-		attachment.setCreatorUid( effectivePerson.getDistinguishedName() );
-		attachment.setSite( site );
-		attachment.setFileHost( "" );
-		attachment.setFilePath( "" );
-		return attachment;
-	}
-
-	public static class Wo extends WoId {
-		@FieldDescribe("操作引起的动态内容")
-		List<WoDynamic> dynamics = new ArrayList<>();
-
-		public List<WoDynamic> getDynamics() {
-			return dynamics;
-		}
-
-		public void setDynamics(List<WoDynamic> dynamics) {
-			this.dynamics = dynamics;
-		}
-	}
-	
-	public static class WoDynamic extends Dynamic{
-
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static WrapCopier<Dynamic, WoDynamic> copier = WrapCopierFactory.wo( Dynamic.class, WoDynamic.class, null, JpaObject.FieldsInvisible);
-		
-		private Long rank = 0L;
-
-		public Long getRank() {
-			return rank;
-		}
-
-		public void setRank(Long rank) {
-			this.rank = rank;
-		}		
-	}
-}

+ 0 - 183
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ActionTaskAttachmentUpload.java

@@ -1,183 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.UUID;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.io.FilenameUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
-
-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.config.StorageMapping;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoId;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.base.core.project.tools.DefaultCharset;
-import com.x.teamwork.assemble.control.ThisApplication;
-import com.x.teamwork.core.entity.Attachment;
-import com.x.teamwork.core.entity.Dynamic;
-import com.x.teamwork.core.entity.Task;
-
-public class ActionTaskAttachmentUpload extends BaseAction {
-	
-	private static Logger logger = LoggerFactory.getLogger(ActionTaskAttachmentUpload.class);
-
-	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, 
-			String taskId, String site, byte[] bytes, FormDataContentDisposition disposition) {
-		ActionResult<Wo> result = new ActionResult<>();
-		Attachment attachment = null;
-		Task task = null;
-		StorageMapping mapping = null;
-		String fileName = null;
-		Boolean check = true;		
-		Wo wo = new Wo();
-		
-		if( Boolean.TRUE.equals( check ) ){
-			if( StringUtils.isEmpty( taskId ) ){
-				check = false;
-				Exception exception = new ExceptionTaskIdEmpty( );
-				result.error( exception );
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){//判断工作信息是否已经存在
-			try {
-				task = taskQueryService.get( taskId );
-				if (null == task) {
-					check = false;
-					Exception exception = new ExceptionTaskNotExists( taskId );
-					result.error( exception );
-				}
-			} catch (Exception e) {
-				check = false;
-				result.error( e );
-				logger.error( e, effectivePerson, request, null );
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				fileName = FilenameUtils.getName(new String(disposition.getFileName().getBytes(DefaultCharset.name_iso_8859_1), DefaultCharset.name));
-				/** 禁止不带扩展名的文件上传 */
-				if (StringUtils.isEmpty(fileName)) {
-					check = false;
-					Exception exception = new ExceptionEmptyExtension( fileName );
-					result.error( exception );
-				} 
-			} catch (Exception e) {
-				check = false;
-				result.error( e );
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				mapping = ThisApplication.context().storageMappings().random( Attachment.class );
-			} catch (Exception e) {
-				check = false;
-				result.error( e );
-				logger.warn( "系统在获取存储的时候发生异常!" );
-				logger.error( e, effectivePerson, request, null );
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				attachment = this.concreteAttachment( mapping, task, fileName, effectivePerson, site );
-				attachment.saveContent(mapping, bytes, fileName);
-				attachment = attachmentPersistService.saveAttachment( task, attachment );
-				wo.setId( attachment.getId() );				
-			} catch (Exception e) {
-				check = false;
-				result.error( e );
-				logger.warn( "系统在保存附件和更新附件数据时候发生异常!" );
-				logger.error( e, effectivePerson, request, null );
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				Dynamic dynamic = dynamicPersistService.uploadAttachmentDynamic(attachment, effectivePerson);
-				if( dynamic != null ) {
-					List<WoDynamic> dynamics = new ArrayList<>();
-					dynamics.add( WoDynamic.copier.copy( dynamic ) );
-					wo.setDynamics(dynamics);
-				}
-			} catch (Exception e) {
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		result.setData(wo);
-		return result;
-	}
-
-	private Attachment concreteAttachment(StorageMapping mapping, Task task, String name, EffectivePerson effectivePerson, String site) throws Exception {
-		Attachment attachment = new Attachment();
-		String fileName = UUID.randomUUID().toString();
-		String extension = FilenameUtils.getExtension( name );
-		if ( StringUtils.isNotEmpty(extension)) {
-			fileName = fileName + "." + extension;
-		}else{
-			throw new Exception("file extension is empty.");
-		}
-		if( name.indexOf( "\\" ) >0 ){
-			name = StringUtils.substringAfterLast( name, "\\");
-		}
-		if( name.indexOf( "/" ) >0 ){
-			name = StringUtils.substringAfterLast( name, "/");
-		}
-		attachment.setCreateTime( new Date() );
-		attachment.setLastUpdateTime( new Date() );
-		attachment.setExtension( extension );
-		attachment.setName( name );
-		attachment.setFileName( fileName );
-		attachment.setStorage( mapping.getName() );
-		attachment.setProjectId( task.getProject() );
-		attachment.setTaskId( task.getId() );
-		attachment.setBundleObjType("TASK") ;
-		attachment.setCreatorUid( effectivePerson.getDistinguishedName() );
-		attachment.setSite( site );
-		attachment.setFileHost( "" );
-		attachment.setFilePath( "" );
-		return attachment;
-	}
-
-	public static class Wo extends WoId {
-		@FieldDescribe("操作引起的动态内容")
-		List<WoDynamic> dynamics = new ArrayList<>();
-
-		public List<WoDynamic> getDynamics() {
-			return dynamics;
-		}
-
-		public void setDynamics(List<WoDynamic> dynamics) {
-			this.dynamics = dynamics;
-		}
-	}
-	
-	public static class WoDynamic extends Dynamic{
-
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static WrapCopier<Dynamic, WoDynamic> copier = WrapCopierFactory.wo( Dynamic.class, WoDynamic.class, null, JpaObject.FieldsInvisible);
-		
-		private Long rank = 0L;
-
-		public Long getRank() {
-			return rank;
-		}
-
-		public void setRank(Long rank) {
-			this.rank = rank;
-		}		
-	}
-}

+ 0 - 193
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/AttachmentAction.java

@@ -1,193 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-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.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 org.glassfish.jersey.media.multipart.FormDataContentDisposition;
-import org.glassfish.jersey.media.multipart.FormDataParam;
-
-import com.x.base.core.project.annotation.JaxrsDescribe;
-import com.x.base.core.project.annotation.JaxrsMethodDescribe;
-import com.x.base.core.project.annotation.JaxrsParameterDescribe;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.http.HttpMediaType;
-import com.x.base.core.project.jaxrs.ResponseFactory;
-import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-
-@Path( "attachment" )
-@JaxrsDescribe("工作任务附件信息管理服务")
-public class AttachmentAction extends StandardJaxrsAction{
-	
-	private static  Logger logger = LoggerFactory.getLogger( AttachmentAction.class );
-
-	@JaxrsMethodDescribe(value = "根据项目ID获取工作附件信息列表", action = ActionListWithProject.class)
-	@GET
-	@Path( "list/project/{id}" )
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void listByProjectId( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("项目ID") @PathParam( "id" ) String id) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
-		ActionResult<List<ActionListWithProject.Wo>> result = new ActionResult<>();
-		try {
-			result = new ActionListWithProject().execute( request, effectivePerson, id );
-		} catch (Exception e) {
-			result = new ActionResult<>();
-			logger.warn( "系统根据项目ID获取项目所有附件信息过程发生异常。" );
-			logger.error( e, effectivePerson, request, null);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-	@JaxrsMethodDescribe(value = "根据工作ID获取工作附件信息列表", action = ActionListWithTask.class)
-	@GET
-	@Path( "list/task/{id}" )
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void listByTaskId( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("工作ID") @PathParam( "id" ) String id) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
-		ActionResult<List<ActionListWithTask.Wo>> result = new ActionResult<>();
-		try {
-			result = new ActionListWithTask().execute( request, effectivePerson, id );
-		} catch (Exception e) {
-			result = new ActionResult<>();
-			logger.warn( "系统根据工作ID获取工作所有附件信息过程发生异常。" );
-			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 delete( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("附件ID") @PathParam( "id" ) String id) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
-		ActionResult<ActionDelete.Wo> result = new ActionResult<>();
-		try {
-			result = new ActionDelete().execute( request, effectivePerson, id );
-		} catch (Exception e) {
-			result = new ActionResult<>();
-			logger.warn( "系统根据ID删除附件信息对象过程发生异常。" );
-			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) {
-		EffectivePerson effectivePerson = this.effectivePerson( request );
-		ActionResult<ActionGet.Wo> result = new ActionResult<>();
-		try {
-			result = new ActionGet().execute( request, effectivePerson, id );
-		} catch (Exception e) {
-			result = new ActionResult<>();
-			logger.warn( "系统根据ID获取附件信息对象过程发生异常。" );
-			logger.error( e, effectivePerson, request, null);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-	@JaxrsMethodDescribe(value = "根据ID下载指定附件", action = ActionDownload.class)
-	@GET
-	@Path("download/{id}")
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void downLoad(@Suspended final AsyncResponse asyncResponse,
-			@Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("附件信息ID") @PathParam("id") String id) {
-		ActionResult<ActionDownload.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionDownload().execute(request, effectivePerson, id);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-
-	@JaxrsMethodDescribe(value = "下载指定附件,设定是否使用stream输出", action = ActionDownloadStream.class)
-	@GET
-	@Path("download/{id}/stream/{stream}")
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void downloadStream(@Suspended final AsyncResponse asyncResponse, 
-			@Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("附件信息ID") @PathParam("id") String id, 
-			@JaxrsParameterDescribe("用.APPLICATION_OCTET_STREAM头输出") @PathParam("stream") Boolean stream) {
-		ActionResult<ActionDownloadStream.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionDownloadStream().execute(request, effectivePerson, id, stream);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-	@JaxrsMethodDescribe(value = "上传项目信息附件.", action = ActionProjectAttachmentUpload.class)
-	@POST
-	@Path("upload/project/{id}/site/{site}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.MULTIPART_FORM_DATA)
-	public void projectAttachmentUpload(@Suspended final AsyncResponse asyncResponse, 
-			@Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("项目信息ID") @PathParam("id") String id, 
-			@JaxrsParameterDescribe("位置") @PathParam("site") String site, 
-			@FormDataParam(FILE_FIELD) final byte[] bytes,
-			@FormDataParam(FILE_FIELD) final FormDataContentDisposition disposition) {
-		ActionResult<ActionProjectAttachmentUpload.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionProjectAttachmentUpload().execute(request, effectivePerson, id, site, bytes, disposition);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-	@JaxrsMethodDescribe(value = "为工作信息上传附件.", action = ActionTaskAttachmentUpload.class)
-	@POST
-	@Path("upload/task/{id}/site/{site}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.MULTIPART_FORM_DATA)
-	public void taskAttachmentUpload(@Suspended final AsyncResponse asyncResponse, 
-			@Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("工作任务ID") @PathParam("id") String id, 
-			@JaxrsParameterDescribe("位置") @PathParam("site") String site, 
-			@FormDataParam(FILE_FIELD) final byte[] bytes,
-			@FormDataParam(FILE_FIELD) final FormDataContentDisposition disposition) {
-		ActionResult<ActionTaskAttachmentUpload.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionTaskAttachmentUpload().execute(request, effectivePerson, id, site, bytes, disposition);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/AttachmentNotExistsException.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import com.x.base.core.project.exception.PromptException;
-
-public class AttachmentNotExistsException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	public AttachmentNotExistsException( String id ) {
-		super("指定ID的附件信息记录不存在。ID:" + id );
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/AttachmentQueryByIdException.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import com.x.base.core.project.exception.PromptException;
-
-public class AttachmentQueryByIdException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	public AttachmentQueryByIdException( Throwable e, String id ) {
-		super("查询指定ID的附件信息时发生异常。ID:" + id, e );
-	}
-}

+ 0 - 25
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/BaseAction.java

@@ -1,25 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.teamwork.assemble.control.service.AttachmentPersistService;
-import com.x.teamwork.assemble.control.service.AttachmentQueryService;
-import com.x.teamwork.assemble.control.service.DynamicPersistService;
-import com.x.teamwork.assemble.control.service.ProjectQueryService;
-import com.x.teamwork.assemble.control.service.TaskPersistService;
-import com.x.teamwork.assemble.control.service.TaskQueryService;
-
-public class BaseAction extends StandardJaxrsAction {		
-	
-	protected AttachmentPersistService attachmentPersistService = new AttachmentPersistService();
-	
-	protected AttachmentQueryService attachmentQueryService = new AttachmentQueryService();
-	
-	protected 	TaskQueryService taskQueryService = new TaskQueryService();
-	
-	protected 	ProjectQueryService projectQueryService = new ProjectQueryService();
-	
-	protected DynamicPersistService dynamicPersistService = new DynamicPersistService();
-	
-	protected 	TaskPersistService taskPersistService = new TaskPersistService();
-	
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionAttachmentDelete.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import com.x.base.core.project.exception.PromptException;
-
-public class ExceptionAttachmentDelete extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	public ExceptionAttachmentDelete( Throwable e, String id ) {
-		super("系统根据id删除附件信息时发生异常。ID:" + id, e );
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionAttachmentIdEmpty.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import com.x.base.core.project.exception.PromptException;
-
-public class ExceptionAttachmentIdEmpty extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	public ExceptionAttachmentIdEmpty() {
-		super("id为空,无法继续进行查询操作。");
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionAttachmentNotExists.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import com.x.base.core.project.exception.PromptException;
-
-public class ExceptionAttachmentNotExists extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	public ExceptionAttachmentNotExists( String id ) {
-		super("指定id的附件信息不存在,无法继续进行操作。ID:" + id );
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionAttachmentQueryById.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import com.x.base.core.project.exception.PromptException;
-
-public class ExceptionAttachmentQueryById extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	public ExceptionAttachmentQueryById( Throwable e, String id ) {
-		super("系统根据id查询附件信息时发生异常。ID:" + id, e );
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionEmptyExtension.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import com.x.base.core.project.exception.PromptException;
-
-public class ExceptionEmptyExtension extends PromptException {
-
-	private static final long serialVersionUID = 4132300948670472899L;
-
-	public ExceptionEmptyExtension(String name) {
-		super("不能上传文件扩展名为空的文件: {}.", name);
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionProjectIdEmpty.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import com.x.base.core.project.exception.PromptException;
-
-public class ExceptionProjectIdEmpty extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	public ExceptionProjectIdEmpty() {
-		super("项目id为空,无法继续进行查询操作。");
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionProjectNotExists.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import com.x.base.core.project.exception.PromptException;
-
-public class ExceptionProjectNotExists extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	public ExceptionProjectNotExists( String id ) {
-		super("指定id的项目信息不存在,无法继续进行操作。ID:" + id );
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionQueryProjectById.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import com.x.base.core.project.exception.PromptException;
-
-public class ExceptionQueryProjectById extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	public ExceptionQueryProjectById( Throwable e, String id ) {
-		super("系统根据id查询项目信息时发生异常。ID:" + id, e );
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionTaskIdEmpty.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import com.x.base.core.project.exception.PromptException;
-
-public class ExceptionTaskIdEmpty extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	public ExceptionTaskIdEmpty() {
-		super("工作任务id为空,无法继续进行查询操作。");
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/attachment/ExceptionTaskNotExists.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.attachment;
-
-import com.x.base.core.project.exception.PromptException;
-
-public class ExceptionTaskNotExists extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	public ExceptionTaskNotExists( String id ) {
-		super("指定ID的工作任务信息记录不存在。ID:" + id );
-	}
-}

+ 0 - 119
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ActionDelete.java

@@ -1,119 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.chat;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.annotation.FieldDescribe;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.cache.ApplicationCache;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoId;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.teamwork.core.entity.Chat;
-import com.x.teamwork.core.entity.Dynamic;
-
-public class ActionDelete extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionDelete.class);
-
-	protected ActionResult<Wo> execute(HttpServletRequest request, EffectivePerson effectivePerson, String id) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		Chat chat = null;
-		Boolean check = true;
-		Wo wo = new Wo();
-
-		if ( StringUtils.isEmpty( id ) ) {
-			check = false;
-			Exception exception = new ChatFlagForQueryEmptyException();
-			result.error( exception );
-		}
-
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				chat = chatQueryService.get( id );
-				if ( chat == null) {
-					check = false;
-					Exception exception = new ChatNotExistsException( id );
-					result.error( exception );
-				}
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ChatQueryException(e, "根据指定flag查询工作交流信息对象时发生异常。ID:" + id);
-				result.error(exception);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				chatPersistService.delete( id, effectivePerson );				
-				// 更新缓存
-				ApplicationCache.notify( Chat.class );
-				
-				wo.setId( chat.getId() );
-				
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ChatQueryException(e, "根据指定flag删除工作交流信息对象时发生异常。ID:" + id);
-				result.error(exception);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		if( Boolean.TRUE.equals( check ) ){
-			try {					
-				Dynamic dynamic = dynamicPersistService.chatDeleteDynamic( chat, effectivePerson);
-				if( dynamic != null ) {
-					List<WoDynamic> dynamics = new ArrayList<>();
-					dynamics.add( WoDynamic.copier.copy( dynamic ) );
-					if( wo != null ) {
-						wo.setDynamics(dynamics);
-					}
-				}
-			} catch (Exception e) {
-				logger.error(e, effectivePerson, request, null);
-			}	
-		}
-		result.setData( wo );
-		return result;
-	}
-
-	public static class Wo extends WoId {
-		
-		@FieldDescribe("操作引起的动态内容")
-		List<WoDynamic> dynamics = new ArrayList<>();
-
-		public List<WoDynamic> getDynamics() {
-			return dynamics;
-		}
-
-		public void setDynamics(List<WoDynamic> dynamics) {
-			this.dynamics = dynamics;
-		}
-		
-	}
-	
-	public static class WoDynamic extends Dynamic{
-
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static WrapCopier<Dynamic, WoDynamic> copier = WrapCopierFactory.wo( Dynamic.class, WoDynamic.class, null, JpaObject.FieldsInvisible);
-		
-		private Long rank = 0L;
-
-		public Long getRank() {
-			return rank;
-		}
-
-		public void setRank(Long rank) {
-			this.rank = rank;
-		}		
-	}
-}

+ 0 - 70
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ActionGet.java

@@ -1,70 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.chat;
-
-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.teamwork.core.entity.Chat;
-
-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;
-		Chat chat = null;
-		Boolean check = true;
-		
-		if( Boolean.TRUE.equals( check ) ){
-			if( id == null || id.isEmpty() ){
-				check = false;
-				Exception exception = new ChatIDEmptyException();
-				result.error( exception );
-			}
-		}
-
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				chat = chatQueryService.get( id );
-				if( chat == null ) {
-					check = false;
-					Exception exception = new ChatNotExistsException(id);
-					result.error( exception );
-				}
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ChatQueryException( e, "系统根据ID查询指定工作评论信息时发生异常.ID:" + id );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				wrap = Wo.copier.copy( chat );
-				result.setData( wrap );
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ChatQueryException( e, "将查询结果转换为可以输出的信息时发生异常." );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		return result;
-	}
-
-	public static class Wo extends Chat  {
-		private static final long serialVersionUID = -5076990764713538973L;		
-		public static List<String> Excludes = new ArrayList<String>();		
-		public static WrapCopier<Chat, Wo> copier = WrapCopierFactory.wo( Chat.class, Wo.class, null,Wo.Excludes);
-	}
-
-}

+ 0 - 58
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ActionGetContent.java

@@ -1,58 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.chat;
-
-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.WoText;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-
-public class ActionGetContent extends BaseAction {
-	
-	private Logger logger = LoggerFactory.getLogger( ActionGetContent.class );
-	
-	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, String id ) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		Wo wrap = null;
-		String chatContent = null;
-		Boolean check = true;
-		
-		if( Boolean.TRUE.equals( check ) ){
-			if( id == null || id.isEmpty() ){
-				check = false;
-				Exception exception = new ChatIDEmptyException();
-				result.error( exception );
-			}
-		}
-
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				chatContent = chatQueryService.getContent( id );
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ChatQueryException( e, "系统根据ID查询指定工作评论信息内容时发生异常.ID:" + id );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				wrap = new Wo();
-				wrap.setText( chatContent );
-				result.setData( wrap );
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ChatQueryException( e, "将查询结果转换为可以输出的信息时发生异常." );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		return result;
-	}
-
-	public static class Wo extends WoText  {
-	}
-
-}

+ 0 - 92
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ActionListNextWithFilter.java

@@ -1,92 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.chat;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.google.gson.JsonElement;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.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.teamwork.core.entity.Chat;
-import com.x.teamwork.core.entity.tools.filter.QueryFilter;
-
-public class ActionListNextWithFilter extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionListNextWithFilter.class);
-
-	protected ActionResult<List<Wo>> execute( HttpServletRequest request, EffectivePerson effectivePerson, String flag, Integer count, JsonElement jsonElement ) throws Exception {
-		ActionResult<List<Wo>> result = new ActionResult<>();
-		List<Wo> wos = new ArrayList<>();
-		Wi wrapIn = null;		
-		Boolean check = true;
-		QueryFilter  queryFilter = null;
-		
-		if ( StringUtils.isEmpty( flag ) || "(0)".equals(flag)) {
-			flag = null;
-		}
-		
-		try {
-			wrapIn = this.convertToWrapIn(jsonElement, Wi.class);
-		} catch (Exception e) {
-			check = false;
-			Exception exception = new ChatQueryException(e, "系统在将JSON信息转换为对象时发生异常。JSON:" + jsonElement.toString());
-			result.error(exception);
-			logger.error(e, effectivePerson, request, null);
-		}
-
-		if( Boolean.TRUE.equals( check ) ){
-			queryFilter = wrapIn.getQueryFilter();
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				Long total = chatQueryService.countWithFilter( queryFilter );
-				List<Chat>  chatList = chatQueryService.listWithFilterNext( count, flag, wrapIn.getOrderField(), wrapIn.getOrderType(), queryFilter );
-				
-				if( ListTools.isNotEmpty( chatList )) {
-					wos = Wo.copier.copy(chatList);
-				}				
-				result.setCount( total );
-				result.setData( wos );
-			} catch (Exception e) {
-				check = false;
-				logger.warn("系统查询项目信息列表时发生异常!");
-				result.error(e);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		return result;
-	}
-	
-	public static class Wi extends WrapInQueryChat{
-	}
-	
-	public static class Wo extends Chat {
-
-		private Long rank;
-
-		public Long getRank() {
-			return rank;
-		}
-
-		public void setRank(Long rank) {
-			this.rank = rank;
-		}
-
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static List<String> Excludes = new ArrayList<String>();
-
-		static WrapCopier<Chat, Wo> copier = WrapCopierFactory.wo( Chat.class, Wo.class, null, ListTools.toList(JpaObject.FieldsInvisible));
-
-	}
-}

+ 0 - 28
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/BaseAction.java

@@ -1,28 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.chat;
-
-import com.x.base.core.project.cache.ApplicationCache;
-import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.teamwork.assemble.control.service.ChatPersistService;
-import com.x.teamwork.assemble.control.service.ChatQueryService;
-import com.x.teamwork.assemble.control.service.DynamicPersistService;
-import com.x.teamwork.assemble.control.service.SystemConfigQueryService;
-import com.x.teamwork.assemble.control.service.TaskQueryService;
-import com.x.teamwork.core.entity.Chat;
-
-import net.sf.ehcache.Ehcache;
-
-public class BaseAction extends StandardJaxrsAction {
-
-	protected Ehcache chatCache = ApplicationCache.instance().getCache( Chat.class );
-	
-	protected 	ChatQueryService chatQueryService = new ChatQueryService();
-	
-	protected 	ChatPersistService chatPersistService = new ChatPersistService();
-	
-	protected 	TaskQueryService taskQueryService = new TaskQueryService();
-	
-	protected 	DynamicPersistService dynamicPersistService = new DynamicPersistService();
-	
-	protected 	SystemConfigQueryService systemConfigQueryService = new SystemConfigQueryService();
-	
-}

+ 0 - 137
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ChatAction.java

@@ -1,137 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.chat;
-
-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.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-
-@Path("chat")
-@JaxrsDescribe("工作评论流信息管理")
-public class ChatAction extends StandardJaxrsAction {
-
-	private Logger logger = LoggerFactory.getLogger(ChatAction.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 = new ActionGet().execute( request, effectivePerson, id );
-			} catch (Exception e) {
-				result = new ActionResult<>();
-				Exception exception = new ChatQueryException( e, "根据ID获取评论信息时发生异常!" );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}	
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-	@JaxrsMethodDescribe( value = "根据ID获取评论信息文字内容", action = ActionGetContent.class )
-	@GET
-	@Path("{id}/content")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void getContent( @Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request, @JaxrsParameterDescribe("评论信息ID") @PathParam("id") String id) {
-		ActionResult<ActionGetContent.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		Boolean check = true;
-		if(check){
-			try {
-				result = new ActionGetContent().execute( request, effectivePerson, id );
-			} catch (Exception e) {
-				result = new ActionResult<>();
-				Exception exception = new ChatQueryException( e, "根据ID获取工作评论信息内容时发生异常!" );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}	
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-	@JaxrsMethodDescribe(value = "列示评论信息,下一页.", action = ActionListNextWithFilter.class)
-	@PUT
-	@Path("list/{id}/next/{count}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void listNextWithFilter(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("最后一条信息数据的ID") @PathParam( "id" ) String id, 
-			@JaxrsParameterDescribe("每页显示的条目数量") @PathParam( "count" ) Integer count, 
-			@JaxrsParameterDescribe("查询过滤条件") JsonElement jsonElement ) {
-		ActionResult<List<ActionListNextWithFilter.Wo>> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionListNextWithFilter().execute(request, effectivePerson, id, count, jsonElement);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		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);
-		try {
-			result = new ActionCreate().execute(request, effectivePerson, jsonElement);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-	@JaxrsMethodDescribe(value = "根据标识删除工作交流信息.", action = ActionDelete.class)
-	@DELETE
-	@Path("{id}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void delete(@Suspended final AsyncResponse asyncResponse, 
-			@Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("标识") @PathParam("id") String id ) {
-		ActionResult<ActionDelete.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionDelete().execute(request, effectivePerson, id);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ChatContentEmptyException.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.chat;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ChatContentEmptyException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	ChatContentEmptyException() {
-		super("工作交流内容为空。" );
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ChatFlagForQueryEmptyException.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.chat;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ChatFlagForQueryEmptyException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	ChatFlagForQueryEmptyException() {
-		super("查询的工作交流信息ID为空,无法继续查询数据。" );
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ChatIDEmptyException.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.chat;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ChatIDEmptyException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	ChatIDEmptyException() {
-		super("工作评论信息ID为空。" );
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ChatNotExistsException.java

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

+ 0 - 20
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ChatPersistException.java

@@ -1,20 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.chat;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ChatPersistException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	ChatPersistException( Throwable e ) {
-		super("系统在保存工作交流信息时发生异常。" , e );
-	}
-	
-	ChatPersistException( Throwable e, String message ) {
-		super("系统在保存工作交流信息时发生异常。Message:" + message, e );
-	}
-	
-	ChatPersistException( String message ) {
-		super("系统在保存工作交流信息时发生异常。Message:" + message );
-	}
-}

+ 0 - 20
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/ChatQueryException.java

@@ -1,20 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.chat;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ChatQueryException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	ChatQueryException( Throwable e ) {
-		super("系统在查询工作交流信息时发生异常。" , e );
-	}
-	
-	ChatQueryException( Throwable e, String message ) {
-		super("系统在查询工作交流信息时发生异常。Message:" + message, e );
-	}
-	
-	ChatQueryException( String message ) {
-		super("系统在查询工作交流信息时发生异常。Message:" + message );
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/TaskIDEmptyException.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.chat;
-
-import com.x.base.core.project.exception.PromptException;
-
-class TaskIDEmptyException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	TaskIDEmptyException() {
-		super("工作任务信息ID为空。" );
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/TaskNotExistsException.java

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

+ 0 - 131
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/chat/WrapInQueryChat.java

@@ -1,131 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.chat;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.project.annotation.FieldDescribe;
-import com.x.teamwork.core.entity.tools.filter.QueryFilter;
-import com.x.teamwork.core.entity.tools.filter.term.EqualsTerm;
-import com.x.teamwork.core.entity.tools.filter.term.LikeTerm;
-
-public class WrapInQueryChat {
-	
-	@FieldDescribe("用于排列的属性,非必填,默认为createTime.")
-	private String orderField = "createTime";
-
-	@FieldDescribe("排序方式:DESC | ASC,非必填,默认为DESC.")
-	private String orderType = "DESC";
-
-	@FieldDescribe("所属工作ID,非必填,过滤条件")
-	private String taskId = null;
-
-	@FieldDescribe("工作标题,非必填,过滤条件")
-	private String taskTitle = null;
-
-	@FieldDescribe("发送者,非必填,过滤条件")
-	private String sender = null;
-
-	@FieldDescribe("目标者,非必填,过滤条件")
-	private String target = null;
-
-	private Long rank = 0L;
-
-	public String getOrderField() {
-		return orderField;
-	}
-
-	public void setOrderField(String orderField) {
-		this.orderField = orderField;
-	}
-
-	public String getOrderType() {
-		return orderType;
-	}
-
-	public void setOrderType(String orderType) {
-		this.orderType = orderType;
-	}
-	
-//	public String getProjectId() {
-//		return projectId;
-//	}
-//
-//	public void setProjectId(String projectId) {
-//		this.projectId = projectId;
-//	}
-//
-//	public String getProjectTitle() {
-//		return projectTitle;
-//	}
-//
-//	public void setProjectTitle(String projectTitle) {
-//		this.projectTitle = projectTitle;
-//	}
-
-	public String getTaskId() {
-		return taskId;
-	}
-
-	public void setTaskId(String taskId) {
-		this.taskId = taskId;
-	}
-
-	public String getTaskTitle() {
-		return taskTitle;
-	}
-
-	public void setTaskTitle(String taskTitle) {
-		this.taskTitle = taskTitle;
-	}
-
-	public String getSender() {
-		return sender;
-	}
-
-	public void setSender(String sender) {
-		this.sender = sender;
-	}
-
-	public String getTarget() {
-		return target;
-	}
-
-	public void setTarget(String target) {
-		this.target = target;
-	}
-
-	public Long getRank() {
-		return rank;
-	}
-
-	public void setRank(Long rank) {
-		this.rank = rank;
-	}
-
-	/**
-	 * 根据传入的查询参数,组织一个完整的QueryFilter对象
-	 * @return
-	 */
-	public QueryFilter getQueryFilter() {
-		QueryFilter queryFilter = new QueryFilter();
-		//组织查询条件对象
-//		if( StringUtils.isNotEmpty( this.getProjectTitle() )) {
-//			queryFilter.addLikeTerm( new LikeTerm( "projectTitle", this.getProjectTitle() ) );
-//		}
-		if( StringUtils.isNotEmpty( this.getTaskTitle() )) {
-			queryFilter.addLikeTerm( new LikeTerm( "taskTitle", this.getTaskTitle() ) );
-		}
-//		if( StringUtils.isNotEmpty( this.getProjectId() )) {
-//			queryFilter.addEqualsTerm( new EqualsTerm( "projectId", this.getProjectId() ) );
-//		}
-		if( StringUtils.isNotEmpty( this.getTaskId() )) {
-			queryFilter.addEqualsTerm( new EqualsTerm( "taskId", this.getTaskId() ) );
-		}
-		if( StringUtils.isNotEmpty( this.getSender())) {
-			queryFilter.addEqualsTerm( new EqualsTerm( "sender", this.getSender() ) );
-		}
-		if( StringUtils.isNotEmpty( this.getTarget() )) {
-			queryFilter.addEqualsTerm( new EqualsTerm( "target", this.getTarget() ) );
-		}
-		return queryFilter;
-	}
-}

+ 0 - 81
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ActionGet.java

@@ -1,81 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.config;
-
-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.teamwork.core.entity.SystemConfig;
-
-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;
-		SystemConfig systemConfig = null;
-		Boolean check = true;
-		
-		if( Boolean.TRUE.equals( check ) ){
-			if( id == null || id.isEmpty() ){
-				check = false;
-				Exception exception = new ExceptionConfigIdEmpty();
-				result.error( exception );
-			}
-		}
-
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				systemConfig = systemConfigQueryService.get( id );
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ExceptionConfigInfoProcess( e, "系统根据ID查询指定考勤系统配置信息时发生异常.ID:" + id );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			if( systemConfig == null ) {
-				try {
-					systemConfig = systemConfigQueryService.getByCode( id );
-				} catch (Exception e) {
-					check = false;
-					Exception exception = new ExceptionConfigInfoProcess( e, "系统根据ID查询指定考勤系统配置信息时发生异常.CODE:" + id );
-					result.error( exception );
-					logger.error( e, effectivePerson, request, null);
-				}
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				wrap = Wo.copier.copy( systemConfig );
-				result.setData( wrap );
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ExceptionConfigInfoProcess( e, "将所有查询到的考勤配置信息对象转换为可以输出的信息时发生异常." );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		return result;
-	}
-
-	public static class Wo extends SystemConfig  {
-		
-		private static final long serialVersionUID = -5076990764713538973L;
-		
-		public static List<String> Excludes = new ArrayList<String>();
-		
-		public static WrapCopier<SystemConfig, Wo> copier = WrapCopierFactory.wo( SystemConfig.class, Wo.class, null,Wo.Excludes);
-	}
-
-}

+ 0 - 66
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ActionGetWithCode.java

@@ -1,66 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.config;
-
-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.teamwork.core.entity.SystemConfig;
-
-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;
-		SystemConfig systemConfig = null;
-		Boolean check = true;
-		
-		if( Boolean.TRUE.equals( check ) ){
-			if( code == null || code.isEmpty() ){
-				check = false;
-				Exception exception = new ExceptionConfigCodeEmpty();
-				result.error( exception );
-			}
-		}
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				systemConfig = systemConfigQueryService.getByCode( code );
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ExceptionConfigInfoProcess( e, "系统根据指定的编码'CODE'查询所有符合条件的考勤系统设置信息列表时发生异常.Code:" + code );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				wrap = Wo.copier.copy( systemConfig );
-				result.setData( wrap );
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ExceptionConfigInfoProcess( e, "将所有查询到的考勤配置信息对象转换为可以输出的信息时发生异常." );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		return result;
-	}
-
-	public static class Wo extends SystemConfig  {
-		
-		private static final long serialVersionUID = -5076990764713538973L;
-		
-		public static List<String> Excludes = new ArrayList<String>();
-		
-		public static WrapCopier<SystemConfig, Wo> copier = WrapCopierFactory.wo( SystemConfig.class, Wo.class, null,Wo.Excludes);
-	}
-
-}

+ 0 - 46
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ActionIsManager.java

@@ -1,46 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.config;
-
-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.http.WrapOutBoolean;
-import com.x.teamwork.core.entity.SystemConfig;
-
-public class ActionIsManager extends BaseAction {
-	
-	protected ActionResult<WrapOutBoolean> execute( HttpServletRequest request, EffectivePerson effectivePerson ) throws Exception {
-		ActionResult<WrapOutBoolean> result = new ActionResult<>();
-		WrapOutBoolean wo = new WrapOutBoolean();
-		Boolean hasRole = false;
-		
-		if(effectivePerson.isManager()) {
-			hasRole = true;
-		}else {
-			try {
-				hasRole = userManagerService.isHasPlatformRole(effectivePerson.getDistinguishedName(), "TeamWorkManager");
-			}catch( Exception e) {
-				e.printStackTrace();
-			}
-		}
-		
-		wo.setValue( hasRole );
-		result.setData(wo);
-		return result;
-	}
-
-	public static class Wo extends SystemConfig  {
-		
-		private static final long serialVersionUID = -5076990764713538973L;
-		
-		public static List<String> Excludes = new ArrayList<String>();
-		
-		public static WrapCopier<SystemConfig, Wo> copier = WrapCopierFactory.wo( SystemConfig.class, Wo.class, null,Wo.Excludes);
-	}
-
-}

+ 0 - 58
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ActionListAll.java

@@ -1,58 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.config;
-
-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.teamwork.core.entity.SystemConfig;
-
-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<>();
-		List<Wo> wraps = null;
-		List<SystemConfig> systemConfigList = null;
-		Boolean check = true;
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				systemConfigList = systemConfigQueryService.listAll();
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ExceptionConfigInfoProcess( e, "系统查询所有考勤系统设置信息列表时发生异常." );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				wraps = Wo.copier.copy( systemConfigList );
-				result.setData(wraps);
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ExceptionConfigInfoProcess( e, "将所有查询到的考勤配置信息对象转换为可以输出的信息时发生异常." );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		return result;
-	}
-	
-	public static class Wo extends SystemConfig  {
-		
-		private static final long serialVersionUID = -5076990764713538973L;
-		
-		public static List<String> Excludes = new ArrayList<String>();
-		
-		public static WrapCopier<SystemConfig, Wo> copier = WrapCopierFactory.wo( SystemConfig.class, Wo.class, null,Wo.Excludes);
-	}
-}

+ 0 - 102
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ActionSave.java

@@ -1,102 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.config;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import com.google.gson.JsonElement;
-import com.x.base.core.entity.JpaObject;
-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.teamwork.core.entity.SystemConfig;
-
-public class ActionSave extends BaseAction {
-	
-	private static Logger logger = LoggerFactory.getLogger( ActionSave.class );
-	
-	protected ActionResult<Wo> execute( HttpServletRequest request, EffectivePerson effectivePerson, JsonElement jsonElement ) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		Wi wrapIn = null;
-		SystemConfig systemConfig = new SystemConfig();
-		Boolean check = true;
-		
-		try {
-			wrapIn = this.convertToWrapIn( jsonElement, Wi.class );
-		} catch (Exception e ) {
-			check = false;
-			Exception exception = new ExceptionConfigInfoProcess( e, "Json格式错误:"+jsonElement.toString() );
-			result.error( exception );
-			logger.error( e, effectivePerson, request, null);
-		}
-		if( Boolean.TRUE.equals( check ) ){
-			if( wrapIn.getConfigCode() == null || wrapIn.getConfigCode().isEmpty() ){
-				check = false;
-				Exception exception = new ExceptionConfigCodeEmpty();
-				result.error( exception );
-			}
-		}
-		if( Boolean.TRUE.equals( check ) ){
-			if( wrapIn.getConfigName() == null || wrapIn.getConfigName().isEmpty() ){
-				check = false;
-				Exception exception = new ExceptionConfigNameEmpty();
-				result.error( exception );
-			}
-		}
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				systemConfig = Wi.copier.copy( wrapIn );
-				if( wrapIn.getId() != null && !wrapIn.getId().isEmpty() ){
-					systemConfig.setId( wrapIn.getId() );
-				}
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ExceptionConfigInfoProcess( e, "系统将用户传入的数据转换为考勤系统配置对象时发生异常." );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				systemConfig = systemConfigPersistService.save( systemConfig );
-				result.setData( new Wo( systemConfig.getId() ) );
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ExceptionConfigInfoProcess( e, "保存考勤系统配置信息时发生异常." );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}
-		}
-		return result;
-	}
-	
-	public static class Wi extends SystemConfig {
-		
-		private static final long serialVersionUID = -5076990764713538973L;
-		
-		public static List<String> Excludes = new ArrayList<String>(JpaObject.FieldsUnmodify);
-		
-		public static WrapCopier< Wi, SystemConfig > copier = WrapCopierFactory.wi( Wi.class, SystemConfig.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 - 22
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/BaseAction.java

@@ -1,22 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.config;
-
-import com.x.base.core.project.cache.ApplicationCache;
-import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.teamwork.assemble.control.service.SystemConfigPersistService;
-import com.x.teamwork.assemble.control.service.SystemConfigQueryService;
-import com.x.teamwork.assemble.control.service.UserManagerService;
-import com.x.teamwork.core.entity.Project;
-
-import net.sf.ehcache.Ehcache;
-
-public class BaseAction extends StandardJaxrsAction{
-	
-	protected Ehcache configCache = ApplicationCache.instance().getCache( Project.class );
-	
-	protected SystemConfigQueryService systemConfigQueryService = new SystemConfigQueryService();
-	
-	protected SystemConfigPersistService systemConfigPersistService = new SystemConfigPersistService();
-	
-	protected UserManagerService userManagerService = new UserManagerService();
-
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ExceptionConfigCodeEmpty.java

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

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ExceptionConfigIdEmpty.java

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

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ExceptionConfigInfoProcess.java

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

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ExceptionConfigNameEmpty.java

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

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/ExceptionConfigNotExists.java

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

+ 0 - 151
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/config/SystemConfigAction.java

@@ -1,151 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.config;
-
-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.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-
-
-@Path("config")
-@JaxrsDescribe("系统设置信息管理服务")
-public class SystemConfigAction extends StandardJaxrsAction{
-	
-	private static Logger logger = LoggerFactory.getLogger( SystemConfigAction.class );
-	
-	@JaxrsMethodDescribe( value = "获取所有系统配置信息列表", action = ActionListAll.class )
-	@GET
-	@Path("list/all")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void listAllSystemConfig( @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 = new ActionListAll().execute( request, effectivePerson );
-			} catch (Exception e) {
-				result = new ActionResult<>();
-				Exception exception = new ExceptionConfigInfoProcess( 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 = new ActionGet().execute( request, effectivePerson, id );
-			} catch (Exception e) {
-				result = new ActionResult<>();
-				Exception exception = new ExceptionConfigInfoProcess( 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 = new ActionGetWithCode().execute( request, effectivePerson, code );
-			} catch (Exception e) {
-				result = new ActionResult<>();
-				Exception exception = new ExceptionConfigInfoProcess( 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 = new ActionIsManager().execute( request, effectivePerson );
-			} catch (Exception e) {
-				result = new ActionResult<>();
-				Exception exception = new ExceptionConfigInfoProcess( 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 = new ActionSave().execute( request, effectivePerson, jsonElement );
-			} catch (Exception e) {
-				result = new ActionResult<>();
-				Exception exception = new ExceptionConfigInfoProcess( e, "新建或者更新系统配置信息时发生异常!" );
-				result.error( exception );
-				logger.error( e, effectivePerson, request, null);
-			}	
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-}

+ 0 - 132
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/ActionListNextWithFilter.java

@@ -1,132 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.dynamic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.google.gson.JsonElement;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.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.teamwork.core.entity.Dynamic;
-import com.x.teamwork.core.entity.tools.filter.QueryFilter;
-
-public class ActionListNextWithFilter extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionListNextWithFilter.class);
-
-	protected ActionResult<List<Wo>> execute( HttpServletRequest request, EffectivePerson effectivePerson, String flag, Integer count, JsonElement jsonElement ) throws Exception {
-		ActionResult<List<Wo>> result = new ActionResult<>();
-		ResultObject resultObject = null;
-		List<Wo> wos = new ArrayList<>();
-		Wi wrapIn = null;		
-		Boolean check = true;
-		QueryFilter  queryFilter = null;
-		
-		if ( StringUtils.isEmpty( flag ) || "(0)".equals(flag)) {
-			flag = null;
-		}
-		
-		try {
-			wrapIn = this.convertToWrapIn(jsonElement, Wi.class);
-		} catch (Exception e) {
-			check = false;
-			Exception exception = new DynamicQueryException(e, "系统在将JSON信息转换为对象时发生异常。JSON:" + jsonElement.toString());
-			result.error(exception);
-			logger.error(e, effectivePerson, request, null);
-		}
-
-		if( Boolean.TRUE.equals( check ) ){
-			queryFilter = wrapIn.getQueryFilter();
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				List<Dynamic>  dynamicList = null;
-				long total = dynamicQueryService.countWithFilter( queryFilter );
-				
-				if( total > 0 ) {
-					dynamicList = dynamicQueryService.listWithFilter( effectivePerson, count, flag, wrapIn.getOrderField(), wrapIn.getOrderType(), queryFilter );			
-				}else {
-					total = 0;
-				}
-				
-				if( ListTools.isNotEmpty( dynamicList )) {
-					wos = Wo.copier.copy(dynamicList);
-				}else {
-					wos = new ArrayList<>();
-				}					
-				resultObject = new ResultObject( total, wos );
-				result.setCount( resultObject.getTotal() );
-				result.setData( resultObject.getWos() );
-			} catch (Exception e) {
-				check = false;
-				logger.warn("系统根据条件查询工作动态信息列表时发生异常!");
-				result.error(e);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		return result;
-	}
-	
-	public static class Wi extends WrapInTaskTag {
-	}
-	
-	public static class Wo extends Dynamic {
-
-		private Long rank;
-
-		public Long getRank() {
-			return rank;
-		}
-
-		public void setRank(Long rank) {
-			this.rank = rank;
-		}
-
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static List<String> Excludes = new ArrayList<String>();
-
-		static WrapCopier<Dynamic, Wo> copier = WrapCopierFactory.wo( Dynamic.class, Wo.class, null, ListTools.toList(JpaObject.FieldsInvisible));
-
-	}
-	
-	public static class ResultObject {
-
-		private Long total;
-		
-		private List<Wo> wos;
-
-		public ResultObject() {}
-		
-		public ResultObject(Long count, List<Wo> data) {
-			this.total = count;
-			this.wos = data;
-		}
-
-		public Long getTotal() {
-			return total;
-		}
-
-		public void setTotal(Long total) {
-			this.total = total;
-		}
-
-		public List<Wo> getWos() {
-			return wos;
-		}
-
-		public void setWos(List<Wo> wos) {
-			this.wos = wos;
-		}
-	}
-}

+ 0 - 149
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/ActionListNextWithProject.java

@@ -1,149 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.dynamic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.google.gson.JsonElement;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.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.teamwork.core.entity.Dynamic;
-import com.x.teamwork.core.entity.tools.filter.QueryFilter;
-import com.x.teamwork.core.entity.tools.filter.term.EqualsTerm;
-
-public class ActionListNextWithProject extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionListNextWithProject.class);
-
-	protected ActionResult<List<Wo>> execute( HttpServletRequest request, EffectivePerson effectivePerson, String flag, Integer count, String projectId, JsonElement jsonElement ) throws Exception {
-		ActionResult<List<Wo>> result = new ActionResult<>();
-		ResultObject resultObject = null;
-		List<Wo> wos = new ArrayList<>();
-		Wi wrapIn = null;
-		Boolean check = true;
-		QueryFilter  queryFilter = null;
-		
-		if ( StringUtils.isEmpty( flag ) || "(0)".equals(flag)) {
-			flag = null;
-		}
-		
-		if ( StringUtils.isEmpty( projectId ) ) {
-			check = false;
-			Exception exception = new ProjectIdForQueryEmptyException();
-			result.error( exception );
-		}
-		
-		try {
-			wrapIn = this.convertToWrapIn(jsonElement, Wi.class);
-		} catch (Exception e) {
-			check = false;
-			Exception exception = new DynamicQueryException(e, "系统在将JSON信息转换为对象时发生异常。JSON:" + jsonElement.toString());
-			result.error(exception);
-			logger.error(e, effectivePerson, request, null);
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			queryFilter = wrapIn.getQueryFilter();
-			queryFilter.addEqualsTerm( new EqualsTerm("projectId", projectId ));
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				List<Dynamic>  dynamicList = null;
-				long total = dynamicQueryService.countWithFilter( queryFilter );
-				if( total > 0 ) {
-					dynamicList = dynamicQueryService.listWithFilter( effectivePerson, count, flag, "createTime", "desc", queryFilter );			
-				}else {
-					total = 0;
-				}
-				
-				if( ListTools.isNotEmpty( dynamicList )) {
-					wos = Wo.copier.copy(dynamicList);
-				}else {
-					wos = new ArrayList<>();
-				}
-				
-				if( ListTools.isNotEmpty( wos )) {
-					for( Wo wo : wos ) {
-						if( wo.getObjectType().equals( "CHAT" )) {
-							//如果是Chat需要把Chat的Content,组装到description里
-							wo.setDescription( chatQueryService.getContent( wo.getBundle() ));
-						}
-					}
-				}
-				
-				resultObject = new ResultObject( total, wos );
-				result.setCount( resultObject.getTotal() );
-				result.setData( resultObject.getWos() );
-			} catch (Exception e) {
-				check = false;
-				logger.warn("系统根据项目查询工作动态信息列表时发生异常!");
-				result.error(e);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		return result;
-	}
-	
-	public static class Wi extends WrapInTaskTag {
-	}
-	
-	public static class Wo extends Dynamic {
-
-		private Long rank;
-
-		public Long getRank() {
-			return rank;
-		}
-
-		public void setRank(Long rank) {
-			this.rank = rank;
-		}
-
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static List<String> Excludes = new ArrayList<String>();
-
-		static WrapCopier<Dynamic, Wo> copier = WrapCopierFactory.wo( Dynamic.class, Wo.class, null, ListTools.toList(JpaObject.FieldsInvisible));
-
-	}
-	
-	public static class ResultObject {
-
-		private Long total;
-		
-		private List<Wo> wos;
-
-		public ResultObject() {}
-		
-		public ResultObject(Long count, List<Wo> data) {
-			this.total = count;
-			this.wos = data;
-		}
-
-		public Long getTotal() {
-			return total;
-		}
-
-		public void setTotal(Long total) {
-			this.total = total;
-		}
-
-		public List<Wo> getWos() {
-			return wos;
-		}
-
-		public void setWos(List<Wo> wos) {
-			this.wos = wos;
-		}
-	}
-}

+ 0 - 151
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/ActionListNextWithTask.java

@@ -1,151 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.dynamic;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.google.gson.JsonElement;
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.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.teamwork.core.entity.Dynamic;
-import com.x.teamwork.core.entity.tools.filter.QueryFilter;
-import com.x.teamwork.core.entity.tools.filter.term.EqualsTerm;
-
-public class ActionListNextWithTask extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionListNextWithTask.class);
-
-	protected ActionResult<List<Wo>> execute( HttpServletRequest request, EffectivePerson effectivePerson, String flag, Integer count, String taskId, JsonElement jsonElement ) throws Exception {
-		ActionResult<List<Wo>> result = new ActionResult<>();
-		ResultObject resultObject = null;
-		List<Wo> wos = new ArrayList<>();
-		Wi wrapIn = null;
-		Boolean check = true;
-		QueryFilter  queryFilter = null;
-		
-		if ( StringUtils.isEmpty( flag ) || "(0)".equals(flag)) {
-			flag = null;
-		}
-		
-		if ( StringUtils.isEmpty( taskId ) ) {
-			check = false;
-			Exception exception = new TaskIdForQueryEmptyException();
-			result.error( exception );
-		}
-		
-		try {
-			wrapIn = this.convertToWrapIn(jsonElement, Wi.class);
-		} catch (Exception e) {
-			check = false;
-			Exception exception = new DynamicQueryException(e, "系统在将JSON信息转换为对象时发生异常。JSON:" + jsonElement.toString());
-			result.error(exception);
-			logger.error(e, effectivePerson, request, null);
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			queryFilter = wrapIn.getQueryFilter();
-			queryFilter.addEqualsTerm( new EqualsTerm("taskId", taskId ));
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				List<Dynamic>  dynamicList = null;
-				long total = dynamicQueryService.countWithFilter( queryFilter );
-				
-				if( total > 0 ) {
-					dynamicList = dynamicQueryService.listWithFilter( effectivePerson, count, flag, "sequence", "desc", queryFilter );			
-				}else {
-					total = 0;
-				}
-				
-				if( ListTools.isNotEmpty( dynamicList )) {
-					wos = Wo.copier.copy(dynamicList);
-					
-				}else {
-					wos = new ArrayList<>();
-				}
-				
-				if( ListTools.isNotEmpty( wos )) {
-					for( Wo wo : wos ) {
-						if( wo.getObjectType().equals( "CHAT" )) {
-							//如果是Chat需要把Chat的Content,组装到description里
-							wo.setDescription( chatQueryService.getContent( wo.getBundle() ));
-						}
-					}
-				}
-				
-				resultObject = new ResultObject( total, wos );
-				result.setCount( resultObject.getTotal() );
-				result.setData( resultObject.getWos() );
-			} catch (Exception e) {
-				check = false;
-				logger.warn("系统根据工作任务查询工作动态信息列表时发生异常!");
-				result.error(e);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		return result;
-	}
-	
-	public static class Wi extends WrapInTaskTag {
-	}
-	
-	public static class Wo extends Dynamic {
-
-		private Long rank;
-
-		public Long getRank() {
-			return rank;
-		}
-
-		public void setRank(Long rank) {
-			this.rank = rank;
-		}
-
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static List<String> Excludes = new ArrayList<String>();
-
-		static WrapCopier<Dynamic, Wo> copier = WrapCopierFactory.wo( Dynamic.class, Wo.class, null, ListTools.toList(JpaObject.FieldsInvisible));
-
-	}
-	
-	public static class ResultObject {
-
-		private Long total;
-		
-		private List<Wo> wos;
-
-		public ResultObject() {}
-		
-		public ResultObject(Long count, List<Wo> data) {
-			this.total = count;
-			this.wos = data;
-		}
-
-		public Long getTotal() {
-			return total;
-		}
-
-		public void setTotal(Long total) {
-			this.total = total;
-		}
-
-		public List<Wo> getWos() {
-			return wos;
-		}
-
-		public void setWos(List<Wo> wos) {
-			this.wos = wos;
-		}
-	}
-}

+ 0 - 21
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/BaseAction.java

@@ -1,21 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.dynamic;
-
-import com.x.base.core.project.cache.ApplicationCache;
-import com.x.base.core.project.jaxrs.StandardJaxrsAction;
-import com.x.teamwork.assemble.control.service.DynamicQueryService;
-import com.x.teamwork.assemble.control.service.ChatQueryService;
-import com.x.teamwork.assemble.control.service.DynamicPersistService;
-import com.x.teamwork.core.entity.Dynamic;
-
-import net.sf.ehcache.Ehcache;
-
-public class BaseAction extends StandardJaxrsAction {
-
-	protected Ehcache dynamicCache = ApplicationCache.instance().getCache( Dynamic.class );
-	
-	protected 	DynamicPersistService dynamicPersistService = new DynamicPersistService();
-
-	protected 	DynamicQueryService dynamicQueryService = new DynamicQueryService();
-	
-	protected 	ChatQueryService chatQueryService = new ChatQueryService();
-}

+ 0 - 95
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/DynamicAction.java

@@ -1,95 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.dynamic;
-
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.Consumes;
-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.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-
-@Path("dynamic")
-@JaxrsDescribe("工作动态信息管理")
-public class DynamicAction extends StandardJaxrsAction {
-
-	private Logger logger = LoggerFactory.getLogger(DynamicAction.class);
-	
-	@JaxrsMethodDescribe(value = "根据过滤条件列示工作动态信息,下一页.", action = ActionListNextWithFilter.class)
-	@PUT
-	@Path("list/{id}/next/{count}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void listNextWithFilter(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("最后一条信息数据的ID") @PathParam( "id" ) String id, 
-			@JaxrsParameterDescribe("每页显示的条目数量") @PathParam( "count" ) Integer count, 
-			@JaxrsParameterDescribe("查询过滤条件") JsonElement jsonElement ) {
-		ActionResult<List<ActionListNextWithFilter.Wo>> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionListNextWithFilter().execute(request, effectivePerson, id, count, jsonElement );
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-	@JaxrsMethodDescribe(value = "根据项目列示工作动态信息,下一页.", action = ActionListNextWithProject.class)
-	@PUT
-	@Path("list/{id}/next/{count}/project/{projectId}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void listNextWithProject(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("最后一条信息数据的ID") @PathParam( "id" ) String id, 
-			@JaxrsParameterDescribe("每页显示的条目数量") @PathParam( "count" ) Integer count, 
-			@JaxrsParameterDescribe("项目ID") @PathParam( "projectId" ) String projectId,
-			@JaxrsParameterDescribe("查询过滤条件") JsonElement jsonElement ) {
-		ActionResult<List<ActionListNextWithProject.Wo>> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionListNextWithProject().execute(request, effectivePerson, id, count, projectId, jsonElement );
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-	@JaxrsMethodDescribe(value = "根据工作任务列示工作动态信息,下一页.", action = ActionListNextWithTask.class)
-	@PUT
-	@Path("list/{id}/next/{count}/task/{taskId}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void listNextWithTask(@Suspended final AsyncResponse asyncResponse, @Context HttpServletRequest request,
-			@JaxrsParameterDescribe("最后一条信息数据的ID") @PathParam( "id" ) String id, 
-			@JaxrsParameterDescribe("每页显示的条目数量") @PathParam( "count" ) Integer count, 
-			@JaxrsParameterDescribe("工作任务ID") @PathParam( "taskId" ) String taskId,
-			@JaxrsParameterDescribe("查询过滤条件") JsonElement jsonElement ) {
-		ActionResult<List<ActionListNextWithTask.Wo>> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionListNextWithTask().execute(request, effectivePerson, id, count, taskId, jsonElement );
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-}

+ 0 - 20
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/DynamicPersistException.java

@@ -1,20 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.dynamic;
-
-import com.x.base.core.project.exception.PromptException;
-
-class DynamicPersistException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	DynamicPersistException( Throwable e ) {
-		super("系统在保存工作交流信息时发生异常。" , e );
-	}
-	
-	DynamicPersistException( Throwable e, String message ) {
-		super("系统在保存工作交流信息时发生异常。Message:" + message, e );
-	}
-	
-	DynamicPersistException( String message ) {
-		super("系统在保存工作交流信息时发生异常。Message:" + message );
-	}
-}

+ 0 - 20
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/DynamicQueryException.java

@@ -1,20 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.dynamic;
-
-import com.x.base.core.project.exception.PromptException;
-
-class DynamicQueryException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	DynamicQueryException( Throwable e ) {
-		super("系统在查询工作交流信息时发生异常。" , e );
-	}
-	
-	DynamicQueryException( Throwable e, String message ) {
-		super("系统在查询工作交流信息时发生异常。Message:" + message, e );
-	}
-	
-	DynamicQueryException( String message ) {
-		super("系统在查询工作交流信息时发生异常。Message:" + message );
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/ProjectIdForQueryEmptyException.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.dynamic;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ProjectIdForQueryEmptyException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	ProjectIdForQueryEmptyException() {
-		super("根据项目查询的工作动态时,项目ID为空,无法继续查询数据。" );
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/TaskIdForQueryEmptyException.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.dynamic;
-
-import com.x.base.core.project.exception.PromptException;
-
-class TaskIdForQueryEmptyException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	TaskIdForQueryEmptyException() {
-		super("根据工作任务查询的工作动态时,工作任务ID为空,无法继续查询数据。" );
-	}
-}

+ 0 - 122
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/dynamic/WrapInTaskTag.java

@@ -1,122 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.dynamic;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.project.annotation.FieldDescribe;
-import com.x.teamwork.core.entity.tools.filter.QueryFilter;
-import com.x.teamwork.core.entity.tools.filter.term.EqualsTerm;
-
-public class WrapInTaskTag {
-	
-	@FieldDescribe("用于排列的属性,非必填,默认为createTime.")
-	private String orderField = "createTime";
-
-	@FieldDescribe("排序方式:DESC | ASC,非必填,默认为DESC.")
-	private String orderType = "DESC";
-	
-	@FieldDescribe("用于搜索的项目ID,<font style='color:red'>必填</font>")
-	private String projectId = null;
-	
-	@FieldDescribe("用于搜索的工作任务ID,非必填.")
-	private String taskId = null;
-	
-	@FieldDescribe("用于搜索的对象类型:PROJECT、TASK、TASKGROUP、TASKLIST、TASKVIEW、CHAT等,非必填.")
-	private String objectType = null;
-	
-	@FieldDescribe("用于搜索的项目、工作或者工作组、列表、视图等对象的ID,非必填.")
-	private String bundle = null;
-	
-	@FieldDescribe("用于搜索的操作类别,非必填.")
-	private String optType = null;
-	
-	private Long rank = 0L;
-
-	public String getProjectId() {
-		return projectId;
-	}
-
-	public void setProjectId(String projectId) {
-		this.projectId = projectId;
-	}
-
-	public String getTaskId() {
-		return taskId;
-	}
-
-	public void setTaskId(String taskId) {
-		this.taskId = taskId;
-	}
-
-	public String getObjectType() {
-		return objectType;
-	}
-
-	public void setObjectType(String objectType) {
-		this.objectType = objectType;
-	}
-
-	public String getBundle() {
-		return bundle;
-	}
-
-	public void setBundle(String bundle) {
-		this.bundle = bundle;
-	}
-
-	public String getOptType() {
-		return optType;
-	}
-
-	public void setOptType(String optType) {
-		this.optType = optType;
-	}
-	
-	public String getOrderField() {
-		return orderField;
-	}
-
-	public void setOrderField(String orderField) {
-		this.orderField = orderField;
-	}
-
-	public String getOrderType() {
-		return orderType;
-	}
-
-	public void setOrderType(String orderType) {
-		this.orderType = orderType;
-	}
-
-	public Long getRank() {
-		return rank;
-	}
-
-	public void setRank(Long rank) {
-		this.rank = rank;
-	}
-
-	/**
-	 * 根据传入的查询参数,组织一个完整的QueryFilter对象
-	 * @return
-	 */
-	public QueryFilter getQueryFilter() {
-		QueryFilter queryFilter = new QueryFilter();
-		//组织查询条件对象
-		if( StringUtils.isNotEmpty( this.getProjectId() )) {
-			queryFilter.addEqualsTerm( new EqualsTerm( "projectId", this.getProjectId() ) );
-		}
-		if( StringUtils.isNotEmpty( this.getTaskId() )) {
-			queryFilter.addEqualsTerm( new EqualsTerm( "taskId", this.getTaskId() ) );
-		}
-		if( StringUtils.isNotEmpty( this.getObjectType())) {
-			queryFilter.addEqualsTerm( new EqualsTerm( "objectType", this.getObjectType() ) );
-		}
-		if( StringUtils.isNotEmpty( this.getOptType() )) {
-			queryFilter.addEqualsTerm( new EqualsTerm( "optType", this.getOptType() ) );
-		}
-		if( StringUtils.isNotEmpty( this.getBundle() )) {
-			queryFilter.addEqualsTerm( new EqualsTerm( "bundle", this.getBundle() ) );
-		}
-		return queryFilter;
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/extfield/ProjectFlagForQueryEmptyException.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.extfield;
-
-import com.x.base.core.project.exception.PromptException;
-
-class ProjectFlagForQueryEmptyException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	ProjectFlagForQueryEmptyException() {
-		super("查询的项目信息ID为空,无法继续查询数据。" );
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/extfield/ProjectNotExistsException.java

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

+ 0 - 140
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionAddTask2ListWithBehindTask.java

@@ -1,140 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.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.cache.ApplicationCache;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.teamwork.core.entity.Task;
-import com.x.teamwork.core.entity.TaskList;
-
-public class ActionAddTask2ListWithBehindTask extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionAddTask2ListWithBehindTask.class);
-	
-	/**
-	 * 一个工作任务在同一个工作任务组里只属于一个任务列表,不可重复
-	 * @param request
-	 * @param effectivePerson
-	 * @param taskListId
-	 * @param jsonElement
-	 * @return
-	 * @throws Exception
-	 */
-	protected ActionResult<Wo> execute(HttpServletRequest request, EffectivePerson effectivePerson, String taskListId, JsonElement jsonElement ) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		Wi wi = null;
-		String message = "任务已经成功添加到列表指定位置!";
-		TaskList taskList = null;
-		Boolean check = true;
-
-		if ( StringUtils.isEmpty( taskListId ) ) {
-			check = false;
-			Exception exception = new TaskListFlagForQueryEmptyException();
-			result.error( exception );
-		}
-		
-		try {
-			wi = this.convertToWrapIn( jsonElement, Wi.class );
-		} catch (Exception e) {
-			check = false;
-			Exception exception = new TaskListPersistException(e, "系统在将JSON信息转换为对象时发生异常。JSON:" + jsonElement.toString());
-			result.error(exception);
-			logger.error(e, effectivePerson, request, null);
-		}
-
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				taskList = taskListQueryService.get( taskListId );
-				if ( taskList == null) {
-					check = false;
-					message = "任务列表不存在或列表为[未归类任务]不允许排序操作!";
-				}else {
-					message = "任务已经成功添加到列表["+ taskList.getName() +"]指定位置!";
-				}
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new TaskListQueryException(e, "根据指定ID查询项目信息对象时发生异常。taskListId:" + taskListId );
-				result.error(exception);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {				
-				taskListPersistService.addTaskToTaskListWithBehindTask( wi.getTaskId(), taskListId, wi.getBehindTaskId(), effectivePerson );
-				// 更新缓存
-				ApplicationCache.notify( TaskList.class );
-				ApplicationCache.notify( Task.class );				
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new TaskListQueryException(e, "向指定的工作任务列表中添加任务信息时发生异常。taskListId:" + taskListId);
-				result.error(exception);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		
-		Wo wo = new Wo();
-		if( taskList != null ) {
-			wo.setId( taskList.getId() );
-		}
-		wo.setMessage(message);
-		result.setData( wo );
-		return result;
-	}
-
-	public static class Wi{
-		
-		@FieldDescribe("需要添加到的列表里的工作任务ID")
-		private String taskId = null;
-		
-		@FieldDescribe("在列表里后面的一个工作任务ID,如果没有,可以为空")
-		private String behindTaskId = null;
-
-		public String getTaskId() {
-			return taskId;
-		}
-
-		public void setTaskId(String taskId) {
-			this.taskId = taskId;
-		}
-
-		public String getBehindTaskId() {
-			return behindTaskId;
-		}
-
-		public void setBehindTaskId(String behindTaskId) {
-			this.behindTaskId = behindTaskId;
-		}
-	}
-
-	public static class Wo {
-		@FieldDescribe("目标工作任务列表ID")
-		private String id = null;
-		
-		@FieldDescribe("操作结果相关的消息")
-		private String message = null;
-
-		public String getId() {
-			return id;
-		}
-
-		public void setId(String id) {
-			this.id = id;
-		}
-
-		public String getMessage() {
-			return message;
-		}
-
-		public void setMessage(String message) {
-			this.message = message;
-		}
-	}
-}

+ 0 - 141
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionAddTask2ListWithOrderNumber.java

@@ -1,141 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.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.cache.ApplicationCache;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.teamwork.core.entity.Task;
-import com.x.teamwork.core.entity.TaskList;
-
-public class ActionAddTask2ListWithOrderNumber extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionAddTask2ListWithOrderNumber.class);
-	
-	/**
-	 * 一个工作任务在同一个工作任务组里只属于一个任务列表,不可重复
-	 * @param request
-	 * @param effectivePerson
-	 * @param taskListId
-	 * @param jsonElement
-	 * @return
-	 * @throws Exception
-	 */
-	protected ActionResult<Wo> execute(HttpServletRequest request, EffectivePerson effectivePerson, String taskListId, JsonElement jsonElement ) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		Wi wi = null;
-		TaskList taskList = null;
-		String message = "任务已经成功添加到列表指定位置!";
-		Boolean check = true;
-
-		if ( StringUtils.isEmpty( taskListId ) ) {
-			check = false;
-			Exception exception = new TaskListFlagForQueryEmptyException();
-			result.error( exception );
-		}
-		
-		try {
-			wi = this.convertToWrapIn( jsonElement, Wi.class );
-		} catch (Exception e) {
-			check = false;
-			Exception exception = new TaskListPersistException(e, "系统在将JSON信息转换为对象时发生异常。JSON:" + jsonElement.toString());
-			result.error(exception);
-			logger.error(e, effectivePerson, request, null);
-		}
-
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				taskList = taskListQueryService.get( taskListId );
-				if ( taskList == null) {
-					check = false;
-					//Exception exception = new TaskListNotExistsException( taskListId );
-					//result.error( exception );
-					message = "任务列表不存在或列表为[未归类任务]不允许排序操作!";
-				}else {
-					message = "任务已经成功添加到列表["+ taskList.getName() +"]指定位置!";
-				}
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new TaskListQueryException(e, "根据指定ID查询项目信息对象时发生异常。taskListId:" + taskListId );
-				result.error(exception);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {				
-				taskListPersistService.addTaskToTaskListWithOrderNumber( wi.getTaskId(), taskListId, wi.getOrderNumber(), effectivePerson );
-				// 更新缓存
-				ApplicationCache.notify( TaskList.class );
-				ApplicationCache.notify( Task.class );
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new TaskListQueryException(e, "向指定的工作任务列表中添加任务信息时发生异常。taskListId:" + taskListId);
-				result.error(exception);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		Wo wo = new Wo();
-		if( taskList != null ) {
-			wo.setId( taskList.getId() );
-		}
-		wo.setMessage(message);
-		result.setData( wo );
-		return result;
-	}
-
-	public static class Wi{
-		
-		@FieldDescribe("需要添加到的列表里的工作任务ID")
-		private String taskId = null;
-		
-		@FieldDescribe("工作任务在列表里的排序位置,如果是最后一个,可以为空")
-		private Integer orderNumber = null;
-
-		public String getTaskId() {
-			return taskId;
-		}
-
-		public void setTaskId(String taskId) {
-			this.taskId = taskId;
-		}
-
-		public Integer getOrderNumber() {
-			return orderNumber;
-		}
-
-		public void setOrderNumber(Integer orderNumber) {
-			this.orderNumber = orderNumber;
-		}
-	}
-
-	public static class Wo {
-		@FieldDescribe("目标工作任务列表ID")
-		private String id = null;
-		
-		@FieldDescribe("操作结果相关的消息")
-		private String message = null;
-
-		public String getId() {
-			return id;
-		}
-
-		public void setId(String id) {
-			this.id = id;
-		}
-
-		public String getMessage() {
-			return message;
-		}
-
-		public void setMessage(String message) {
-			this.message = message;
-		}
-	}
-}

+ 0 - 75
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionDelete.java

@@ -1,75 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.list;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.project.cache.ApplicationCache;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoId;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.teamwork.core.entity.TaskList;
-
-public class ActionDelete extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionDelete.class);
-
-	protected ActionResult<Wo> execute(HttpServletRequest request, EffectivePerson effectivePerson, String id) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		TaskList taskList = null;
-		Boolean check = true;
-
-		if ( StringUtils.isEmpty( id ) ) {
-			check = false;
-			Exception exception = new TaskListFlagForQueryEmptyException();
-			result.error( exception );
-		}
-
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				taskList = taskListQueryService.get(id);
-				if ( taskList == null) {
-					check = false;
-					Exception exception = new TaskListNotExistsException(id);
-					result.error( exception );
-				}
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new TaskListQueryException(e, "根据指定flag查询项目信息对象时发生异常。id:" + id);
-				result.error(exception);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				//物理删除
-				taskListPersistService.delete(id, effectivePerson);
-				// 更新缓存
-				ApplicationCache.notify( TaskList.class );
-				
-				Wo wo = new Wo();
-				wo.setId( taskList.getId() );
-				result.setData( wo );
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new TaskListQueryException(e, "根据指定flag删除项目信息对象时发生异常。id:" + id);
-				result.error(exception);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		if( Boolean.TRUE.equals( check ) ){
-			try {					
-				dynamicPersistService.taskListDeleteDynamic( taskList, effectivePerson);
-			} catch (Exception e) {
-				logger.error(e, effectivePerson, request, null);
-			}	
-		}
-		return result;
-	}
-
-	public static class Wo extends WoId {
-	}
-}

+ 0 - 124
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionGet.java

@@ -1,124 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.list;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.annotation.FieldDescribe;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.cache.ApplicationCache;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.base.core.project.tools.ListTools;
-import com.x.teamwork.assemble.control.jaxrs.list.ActionListWithTaskGroup.Control;
-import com.x.teamwork.core.entity.TaskGroup;
-import com.x.teamwork.core.entity.TaskList;
-
-import net.sf.ehcache.Element;
-
-public class ActionGet extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionGet.class);
-
-	protected ActionResult<Wo> execute(HttpServletRequest request, EffectivePerson effectivePerson, String taskGroupId, String taskListId ) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		Wo wo = null;
-		TaskList taskList = null;
-		Boolean check = true;
-
-		if ( StringUtils.isEmpty( taskListId ) ) {
-			check = false;
-			Exception exception = new TaskListFlagForQueryEmptyException();
-			result.error( exception );
-		}
-
-		String cacheKey = ApplicationCache.concreteCacheKey( taskListId );
-		Element element = taskListCache.get( cacheKey );
-
-		if ((null != element) && (null != element.getObjectValue())) {
-			wo = (Wo) element.getObjectValue();
-			result.setData( wo );
-		} else {
-			if( Boolean.TRUE.equals( check ) ){
-				try {
-					taskList = taskListQueryService.get( taskListId );
-				} catch (Exception e) {
-					check = false;
-					Exception exception = new TaskListQueryException(e, "根据指定id查询工作任务列表信息对象时发生异常。ID:" + taskListId );
-					result.error(exception);
-					logger.error(e, effectivePerson, request, null);
-				}
-			}
-			
-			if( Boolean.TRUE.equals( check ) ){
-				try {
-					if( taskList != null ) {
-						wo = Wo.copier.copy( taskList );
-						wo.setTaskCount(taskListQueryService.countTaskWithTaskListId( effectivePerson.getDistinguishedName(), wo.getId(), wo.getTaskGroup() ));
-					}else {
-						if( StringUtils.isEmpty( taskGroupId )) {
-							check = false;
-							Exception exception = new TaskListQueryException( "工作任务分组ID都不能为空。"  );
-							result.error( exception );
-						}
-						TaskGroup taskGroup = taskGroupQueryService.get( taskGroupId );
-						if( taskGroup != null ) {
-							wo = Wo.copier.copy( taskListQueryService.getNoneList( taskGroup.getProject(), taskGroupId, effectivePerson.getDistinguishedName() ) );
-							wo.setTaskCount(taskListQueryService.countTaskWithTaskListId( effectivePerson.getDistinguishedName(), wo.getId(), wo.getTaskGroup() ));
-						}
-					}
-					if( "NoneList".equalsIgnoreCase( wo.getMemo() )) {
-						wo.setControl( new Control(false, false, false, false ));
-					}else {
-						wo.setControl( new Control(true, true, true, true));
-					}
-					taskListCache.put(new Element(cacheKey, wo));
-					result.setData(wo);
-				} catch (Exception e) {
-					Exception exception = new TaskListQueryException(e, "将查询出来的工作任务列表信息对象转换为可输出的数据信息时发生异常。");
-					result.error(exception);
-					logger.error(e, effectivePerson, request, null);
-				}
-			}
-		}
-		return result;
-	}
-
-	public static class Wo extends TaskList {
-		
-		@FieldDescribe("工作任务数量.")
-		private Long taskCount = 0L;
-		
-		@FieldDescribe("工作任务列表操作权限.")
-		private Control control;
-		
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static List<String> Excludes = new ArrayList<String>();
-
-		static WrapCopier<TaskList, Wo> copier = WrapCopierFactory.wo( TaskList.class, Wo.class, null, ListTools.toList(JpaObject.FieldsInvisible));
-
-		public Long getTaskCount() {
-			return taskCount;
-		}
-
-		public void setTaskCount(Long taskCount) {
-			this.taskCount = taskCount;
-		}
-
-		public Control getControl() {
-			return control;
-		}
-
-		public void setControl(Control control) {
-			this.control = control;
-		}		
-	}
-}

+ 0 - 77
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionList.java

@@ -1,77 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.list;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.cache.ApplicationCache;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.base.core.project.tools.ListTools;
-import com.x.teamwork.core.entity.TaskList;
-
-import net.sf.ehcache.Element;
-
-public class ActionList extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionList.class);
-
-	@SuppressWarnings("unchecked")
-	protected ActionResult<List<Wo>> execute(HttpServletRequest request, EffectivePerson effectivePerson, String projectId ) throws Exception {
-		ActionResult<List<Wo>> result = new ActionResult<>();
-		List<Wo> wos = null;
-		List<TaskList> taskLists = null;
-		Boolean check = true;
-
-		String cacheKey = ApplicationCache.concreteCacheKey( "list.my", effectivePerson.getDistinguishedName(), projectId );
-		Element element = taskListCache.get( cacheKey );
-
-		if ((null != element) && (null != element.getObjectValue())) {
-			wos = (List<Wo>) element.getObjectValue();
-			result.setData( wos );
-		} else {
-			if( Boolean.TRUE.equals( check ) ){
-				try {
-					taskLists = taskListQueryService.listWithProject( effectivePerson.getDistinguishedName(), projectId );
-					if( ListTools.isNotEmpty( taskLists )) {
-						wos = Wo.copier.copy( taskLists );
-						taskListCache.put(new Element(cacheKey, wos));
-						result.setData(wos);
-					}
-				} catch (Exception e) {
-					check = false;
-					Exception exception = new TaskListQueryException(e, "根据用户拥有的工作任务列表信息时发生异常。");
-					result.error(exception);
-					logger.error(e, effectivePerson, request, null);
-				}
-			}
-		}
-		return result;
-	}
-
-	public static class Wo extends TaskList {
-		
-		private Long rank;
-
-		public Long getRank() {
-			return rank;
-		}
-
-		public void setRank(Long rank) {
-			this.rank = rank;
-		}
-
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static List<String> Excludes = new ArrayList<String>();
-
-		static WrapCopier<TaskList, Wo> copier = WrapCopierFactory.wo( TaskList.class, Wo.class, null, ListTools.toList(JpaObject.FieldsInvisible));
-
-	}
-}

+ 0 - 207
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionListWithTaskGroupWithTask.java

@@ -1,207 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.list;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.annotation.FieldDescribe;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.cache.ApplicationCache;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.base.core.project.tools.ListTools;
-import com.x.teamwork.core.entity.Task;
-import com.x.teamwork.core.entity.TaskList;
-import com.x.teamwork.core.entity.TaskTag;
-
-import net.sf.ehcache.Element;
-
-public class ActionListWithTaskGroupWithTask extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionListWithTaskGroupWithTask.class);
-
-	@SuppressWarnings("unchecked")
-	protected ActionResult<List<Wo>> execute(HttpServletRequest request, EffectivePerson effectivePerson, String taskGroupId, Boolean withTask ) throws Exception {
-		ActionResult<List<Wo>> result = new ActionResult<>();
-		List<Wo> wos = null;
-		List<TaskList> taskLists = null;
-		List<Task>  tasks = null;
-		List<TaskTag> tags = null;
-		Boolean check = true;
-
-		String cacheKey = ApplicationCache.concreteCacheKey( "list.my.taskgroup", taskGroupId, withTask, effectivePerson.getDistinguishedName() );
-		Element element = taskListCache.get( cacheKey );
-
-		if ((null != element) && (null != element.getObjectValue())) {
-			wos = (List<Wo>) element.getObjectValue();
-			result.setData( wos );
-		} else {
-			if( Boolean.TRUE.equals( check ) ){
-				try {
-					taskLists = taskListQueryService.listWithTaskGroup( effectivePerson.getDistinguishedName(), taskGroupId );
-					if( ListTools.isNotEmpty( taskLists )) {
-						wos = Wo.copier.copy( taskLists );
-						if( ListTools.isNotEmpty( wos )) {
-							for( Wo wo : wos ) {
-								//计算当前List里的任务数量
-								wo.setTaskCount(taskListQueryService.countTaskWithTaskListId( effectivePerson.getDistinguishedName(), wo.getId(), wo.getTaskGroup() ));
-								if( "NoneList".equalsIgnoreCase( wo.getMemo() )) {
-									wo.setControl( new Control(false, false, false ));
-								}else {
-									wo.setControl( new Control(true, true, true ));
-								}
-								if( withTask ) {
-									//查询List下的所有任务信息集合
-									tasks = taskQueryService.listMyTaskWithTaskListId( wo.getProject(), wo.getId(), effectivePerson.getDistinguishedName() );
-									if( ListTools.isNotEmpty( tasks )) {
-										wo.setTasks( WoTask.copier.copy( tasks ) );
-									}else {
-										wo.setTasks( new ArrayList<>());
-									}
-									if( ListTools.isNotEmpty( wo.getTasks() )) {
-										for( WoTask task : wo.getTasks() ) {
-											tags = taskTagQueryService.listTagsWithTask(effectivePerson, task.getId());
-											if( ListTools.isNotEmpty( tags )) {
-												task.setTags( WoTaskTag.copier.copy( tags ));
-											}
-										}
-									}
-								}
-							}
-						}
-						taskListCache.put(new Element(cacheKey, wos));
-						result.setData(wos);
-					}
-				} catch (Exception e) {
-					check = false;
-					Exception exception = new TaskListQueryException(e, "根据用户在指定工作任务组拥有的工作任务列表信息时发生异常。");
-					result.error(exception);
-					logger.error(e, effectivePerson, request, null);
-				}
-			}
-		}
-		return result;
-	}
-
-	public static class Wo extends TaskList {
-		
-		private Long rank;
-		
-		@FieldDescribe("工作任务数量.")
-		private Long taskCount = 0L;
-		
-		@FieldDescribe("工作任务列表操作权限.")
-		private Control control;
-		
-		@FieldDescribe("工作任务信息集合.")
-		private List<WoTask> tasks;		
-		
-		public List<WoTask> getTasks() {
-			return tasks;
-		}
-
-		public void setTasks(List<WoTask> tasks) {
-			this.tasks = tasks;
-		}
-
-		public Control getControl() {
-			return control;
-		}
-
-		public void setControl(Control control) {
-			this.control = control;
-		}
-
-		public Long getRank() {
-			return rank;
-		}
-
-		public void setRank(Long rank) {
-			this.rank = rank;
-		}
-
-		public Long getTaskCount() {
-			return taskCount;
-		}
-
-		public void setTaskCount(Long taskCount) {
-			this.taskCount = taskCount;
-		}
-
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static List<String> Excludes = new ArrayList<String>();
-
-		static WrapCopier<TaskList, Wo> copier = WrapCopierFactory.wo( TaskList.class, Wo.class, null, ListTools.toList(JpaObject.FieldsInvisible));
-
-	}
-	
-	public static class WoTask extends WoTaskSimple{
-		
-		@FieldDescribe("任务标签")
-		private List<WoTaskTag> tags = null;
-		
-		public List<WoTaskTag> getTags() {
-			return tags;
-		}
-
-		public void setTags(List<WoTaskTag> tags) {
-			this.tags = tags;
-		}
-		
-		public static List<String> Excludes = new ArrayList<String>();
-
-		static WrapCopier<Task, WoTask> copier = WrapCopierFactory.wo( Task.class, WoTask.class, null, ListTools.toList(JpaObject.FieldsInvisible));
-	}
-	
-	public static class WoTaskTag extends TaskTag {
-		
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static List<String> Excludes = new ArrayList<String>();
-
-		static WrapCopier<TaskTag, WoTaskTag> copier = WrapCopierFactory.wo( TaskTag.class, WoTaskTag.class, null, ListTools.toList(JpaObject.FieldsInvisible));		
-
-	}
-
-	public static class Control{
-		 
-		private Boolean delete = false;
-		
-		private Boolean edit = false;
-		
-		private Boolean sortable = true;
-
-		public Control( Boolean edit, Boolean delete, Boolean sortable ) {
-			this.delete = delete;
-			this.edit = edit;
-			this.sortable = sortable;
-		}
-		public Boolean getDelete() {
-			return delete;
-		}
-
-		public void setDelete(Boolean delete) {
-			this.delete = delete;
-		}
-
-		public Boolean getEdit() {
-			return edit;
-		}
-
-		public void setEdit(Boolean edit) {
-			this.edit = edit;
-		}
-		public Boolean getSortable() {
-			return sortable;
-		}
-		public void setSortable(Boolean sortable) {
-			this.sortable = sortable;
-		}
-	}
-}

+ 0 - 95
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionRefreshTaskList.java

@@ -1,95 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.list;
-
-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.cache.ApplicationCache;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoId;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.teamwork.core.entity.TaskList;
-
-public class ActionRefreshTaskList extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionRefreshTaskList.class);
-
-	protected ActionResult<Wo> execute(HttpServletRequest request, EffectivePerson effectivePerson, String id, JsonElement jsonElement ) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		Wi wi = null;
-		TaskList taskList = null;
-		Boolean check = true;
-
-		if ( StringUtils.isEmpty( id ) ) {
-			check = false;
-			Exception exception = new TaskListFlagForQueryEmptyException();
-			result.error( exception );
-		}
-
-		try {
-			wi = this.convertToWrapIn( jsonElement, Wi.class );
-		} catch (Exception e) {
-			check = false;
-			Exception exception = new TaskListPersistException(e, "系统在将JSON信息转换为对象时发生异常。JSON:" + jsonElement.toString());
-			result.error(exception);
-			logger.error(e, effectivePerson, request, null);
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				taskList = taskListQueryService.get( id );
-				if ( taskList == null) {
-					check = false;
-					Exception exception = new TaskListNotExistsException( id );
-					result.error( exception );
-				}
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new TaskListQueryException(e, "根据指定flag查询项目信息对象时发生异常。id:" + id);
-				result.error(exception);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				taskListPersistService.refreshTaskListRele(wi.getTaskIds(), id, effectivePerson);
-				// 更新缓存
-				ApplicationCache.notify( TaskList.class );
-				
-				Wo wo = new Wo();
-				wo.setId( taskList.getId() );
-				result.setData( wo );
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new TaskListQueryException(e, "向指定的工作任务列表中添加任务信息时发生异常。id:" + id);
-				result.error(exception);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}		
-		return result;
-	}
-
-	public static class Wi{
-		
-		@FieldDescribe("需要添加到的列表里的工作任务ID")
-		private List<String> taskIds = null;
-
-		public List<String> getTaskIds() {
-			return taskIds;
-		}
-
-		public void setTaskIds(List<String> taskIds) {
-			this.taskIds = taskIds;
-		}		
-	}
-
-	public static class Wo extends WoId {
-	}
-}

+ 0 - 73
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionRemoveTaskFromList.java

@@ -1,73 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.list;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.project.cache.ApplicationCache;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoId;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.teamwork.core.entity.TaskList;
-
-public class ActionRemoveTaskFromList extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionRemoveTaskFromList.class);
-
-	protected ActionResult<Wo> execute(HttpServletRequest request, EffectivePerson effectivePerson, String id, String taskId ) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		TaskList taskList = null;
-		Boolean check = true;
-
-		if ( StringUtils.isEmpty( id ) ) {
-			check = false;
-			Exception exception = new TaskListFlagForQueryEmptyException();
-			result.error( exception );
-		}
-		
-		if ( StringUtils.isEmpty( taskId ) ) {
-			check = false;
-			Exception exception = new TaskIdForRemoveEmptyException();;
-			result.error( exception );
-		}
-
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				taskList = taskListQueryService.get( id );
-				if ( taskList == null) {
-					check = false;
-					Exception exception = new TaskListNotExistsException( id );
-					result.error( exception );
-				}
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new TaskListQueryException(e, "根据指定flag查询项目信息对象时发生异常。id:" + id );
-				result.error(exception);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				taskListPersistService.removeTaskFromList(taskId, id, effectivePerson);
-				// 更新缓存
-				ApplicationCache.notify( TaskList.class );
-				
-				Wo wo = new Wo();
-				wo.setId( taskList.getId() );
-				result.setData( wo );
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new TaskListQueryException(e, "从指定的工作任务列表中删除任务信息时发生异常。id:" + id);
-				result.error(exception);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}		
-		return result;
-	}
-
-	public static class Wo extends WoId {
-	}
-}

+ 0 - 131
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/ActionSave.java

@@ -1,131 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.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.cache.ApplicationCache;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoId;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.teamwork.core.entity.TaskList;
-
-public class ActionSave extends BaseAction {
-
-	private static  Logger logger = LoggerFactory.getLogger(ActionSave.class);
-
-	protected ActionResult<Wo> execute(HttpServletRequest request, EffectivePerson effectivePerson, JsonElement jsonElement ) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		TaskList taskList = null;
-		TaskList taskList_old = null;
-		Wi wi = null;
-		Boolean check = true;
-
-		try {
-			wi = this.convertToWrapIn( jsonElement, Wi.class );
-		} catch (Exception e) {
-			check = false;
-			Exception exception = new TaskListPersistException(e, "系统在将JSON信息转换为对象时发生异常。JSON:" + jsonElement.toString());
-			result.error(exception);
-			logger.error(e, effectivePerson, request, null);
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			taskList_old = taskListQueryService.get( wi.getId() );
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				
-				taskList = taskListPersistService.save( Wi.copier.copy(wi), effectivePerson );
-				
-				// 更新缓存
-				ApplicationCache.notify( TaskList.class );
-				Wo wo = new Wo();
-				wo.setId( taskList.getId() );
-				result.setData( wo );
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new TaskListPersistException(e, "工作任务列表信息保存时发生异常。");
-				result.error(exception);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		if( Boolean.TRUE.equals( check ) ){
-			try {					
-				dynamicPersistService.taskListSaveDynamic(taskList_old, taskList, effectivePerson,  jsonElement.toString() );
-			} catch (Exception e) {
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		return result;
-	}	
-
-	public static class Wi{
-		
-		@FieldDescribe("列表ID,新建时为空.")
-		private String id;
-		
-		@FieldDescribe("所属任务分组(必填).")
-		private String taskGroup;
-		
-		@FieldDescribe("工作任务列表名称(必填)")
-		private String name;
-		
-		@FieldDescribe("排序号")
-		private Integer order = 0;
-		
-		@FieldDescribe("列表描述")
-		private String memo;			
-		
-		public static WrapCopier<Wi, TaskList> copier = WrapCopierFactory.wi( Wi.class, TaskList.class, null, null );		
-		
-		public String getId() {
-			return id;
-		}
-
-		public void setId(String id) {
-			this.id = id;
-		}
-
-		public String getTaskGroup() {
-			return taskGroup;
-		}
-
-		public void setTaskGroup(String taskGroup) {
-			this.taskGroup = taskGroup;
-		}
-
-		public String getName() {
-			return name;
-		}
-
-		public void setName(String name) {
-			this.name = name;
-		}
-
-		public Integer getOrder() {
-			return order;
-		}
-
-		public void setOrder(Integer order) {
-			this.order = order;
-		}
-
-		public String getMemo() {
-			return memo;
-		}
-
-		public void setMemo(String memo) {
-			this.memo = memo;
-		}		
-	}
-
-	public static class Wo extends WoId {
-	}
-	
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/TaskIdForAddEmptyException.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.list;
-
-import com.x.base.core.project.exception.PromptException;
-
-class TaskIdForAddEmptyException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	TaskIdForAddEmptyException() {
-		super("需要添加到列表的工作任务信息ID为空,无法继续操作。" );
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/TaskIdForRemoveEmptyException.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.list;
-
-import com.x.base.core.project.exception.PromptException;
-
-class TaskIdForRemoveEmptyException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	TaskIdForRemoveEmptyException() {
-		super("需要从列表中删除的工作任务信息ID为空,无法继续操作。" );
-	}
-}

+ 0 - 212
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/TaskListAction.java

@@ -1,212 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.list;
-
-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.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-
-@Path("task_list")
-@JaxrsDescribe("任务列表管理")
-public class TaskListAction extends StandardJaxrsAction {
-
-	private Logger logger = LoggerFactory.getLogger(TaskListAction.class);
-
-	@JaxrsMethodDescribe(value = "根据ID查询工作任务列表信息.", action = ActionGet.class)
-	@GET
-	@Path("taskgroup/{taskGroupId}/tasklist/{taskListId}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void get(@Suspended final AsyncResponse asyncResponse, 
-			@Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("工作任务分组ID") @PathParam("taskGroupId") String taskGroupId,
-			@JaxrsParameterDescribe("工作任务列表ID") @PathParam("taskListId") String taskListId ) {
-		ActionResult<ActionGet.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionGet().execute( request, effectivePerson, taskGroupId, taskListId );
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-	@JaxrsMethodDescribe(value = "根据工作任务组查询工作列表信息列表.", action = ActionListWithTaskGroup.class)
-	@GET
-	@Path("list/taskgroup/{taskgroup}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void listWithTaskGroup(@Suspended final AsyncResponse asyncResponse, 
-			@Context HttpServletRequest request,
-			@JaxrsParameterDescribe("工作任务组ID") @PathParam("taskgroup") String taskgroup) {
-		ActionResult<List<ActionListWithTaskGroup.Wo>> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionListWithTaskGroup().execute( request, effectivePerson, taskgroup );
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-	@JaxrsMethodDescribe(value = "根据工作任务组查询工作列表信息列表.", action = ActionListWithTaskGroupWithTask.class)
-	@GET
-	@Path("list/taskgroup/{taskgroup}/{withTask}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void listWithTaskGroupWithTask(@Suspended final AsyncResponse asyncResponse, 
-			@Context HttpServletRequest request,
-			@JaxrsParameterDescribe("工作任务组ID") @PathParam("taskgroup") String taskgroup,
-			@JaxrsParameterDescribe("是否包含工作列表") @PathParam("withTask") Boolean withTask) {
-		ActionResult<List<ActionListWithTaskGroupWithTask.Wo>> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionListWithTaskGroupWithTask().execute( request, effectivePerson, taskgroup, withTask );
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		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);
-		try {
-			result = new ActionSave().execute(request, effectivePerson, jsonElement);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-	@JaxrsMethodDescribe(value = "重新指定列表中所有的任务(删除原来的关联,添加新的关联).", action = ActionRefreshTaskList.class)
-	@PUT
-	@Path("tasklist/refresh")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void refreshTaskList(@Suspended final AsyncResponse asyncResponse, 
-			@Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("工作任务列表ID") @PathParam("id") String id,
-			@JaxrsParameterDescribe("需要关联的工作任务ID") JsonElement jsonElement ) {
-		ActionResult<ActionRefreshTaskList.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionRefreshTaskList().execute(request, effectivePerson, id,  jsonElement);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-	@JaxrsMethodDescribe(value = "将一个工作任务添加到指定的列表中.", action = ActionAddTask2ListWithOrderNumber.class)
-	@PUT
-	@Path("add2list/{listId}/order")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void addTask2ListWithOrderNumber(@Suspended final AsyncResponse asyncResponse, 
-			@Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("工作任务列表ID") @PathParam("listId") String listId,
-			@JaxrsParameterDescribe("需要关联的工作任务ID及排序号信息") JsonElement jsonElement) {
-		ActionResult<ActionAddTask2ListWithOrderNumber.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionAddTask2ListWithOrderNumber().execute(request, effectivePerson, listId, jsonElement );
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-	@JaxrsMethodDescribe(value = "将一个工作任务添加到指定的列表中.", action = ActionAddTask2ListWithBehindTask.class)
-	@PUT
-	@Path("add2list/{listId}/behindTask")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void addTask2ListWithBehindTask(@Suspended final AsyncResponse asyncResponse, 
-			@Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("工作任务列表ID") @PathParam("listId") String listId,
-			@JaxrsParameterDescribe("需要关联的工作任务ID及后序工作任务ID") JsonElement jsonElement) {
-		ActionResult<ActionAddTask2ListWithBehindTask.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionAddTask2ListWithBehindTask().execute(request, effectivePerson, listId, jsonElement );
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-	@JaxrsMethodDescribe(value = "将一个工作任务从指定的列表中移除.", action = ActionRemoveTaskFromList.class)
-	@DELETE
-	@Path("remove/{listId}/task/{taskId}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void removeTaskFromList(@Suspended final AsyncResponse asyncResponse, 
-			@Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("工作任务列表ID") @PathParam("listId") String listId,
-			@JaxrsParameterDescribe("工作任务ID") @PathParam("taskId") String taskId ) {
-		ActionResult<ActionRemoveTaskFromList.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionRemoveTaskFromList().execute(request, effectivePerson, listId, taskId);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-	
-	@JaxrsMethodDescribe(value = "删除工作任务列表信息.", action = ActionDelete.class)
-	@DELETE
-	@Path("delete/{id}")
-	@Produces(HttpMediaType.APPLICATION_JSON_UTF_8)
-	@Consumes(MediaType.APPLICATION_JSON)
-	public void delete(@Suspended final AsyncResponse asyncResponse, 
-			@Context HttpServletRequest request, 
-			@JaxrsParameterDescribe("标识") @PathParam("id") String id ) {
-		ActionResult<ActionDelete.Wo> result = new ActionResult<>();
-		EffectivePerson effectivePerson = this.effectivePerson(request);
-		try {
-			result = new ActionDelete().execute(request, effectivePerson, id);
-		} catch (Exception e) {
-			logger.error(e, effectivePerson, request, null);
-			result.error(e);
-		}
-		asyncResponse.resume(ResponseFactory.getEntityTagActionResultResponse(request, result));
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/TaskListFlagForQueryEmptyException.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.list;
-
-import com.x.base.core.project.exception.PromptException;
-
-class TaskListFlagForQueryEmptyException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	TaskListFlagForQueryEmptyException() {
-		super("查询的工作任务列表信息ID为空,无法继续查询数据。" );
-	}
-}

+ 0 - 12
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/TaskListNotExistsException.java

@@ -1,12 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.list;
-
-import com.x.base.core.project.exception.PromptException;
-
-class TaskListNotExistsException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	TaskListNotExistsException( String id ) {
-		super("指定ID的工作任务列表信息不存在。ID:" + id );
-	}
-}

+ 0 - 20
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/TaskListPersistException.java

@@ -1,20 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.list;
-
-import com.x.base.core.project.exception.PromptException;
-
-class TaskListPersistException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	TaskListPersistException( Throwable e ) {
-		super("系统在保存工作任务列表信息时发生异常。" , e );
-	}
-	
-	TaskListPersistException( Throwable e, String message ) {
-		super("系统在保存工作任务列表信息时发生异常。Message:" + message, e );
-	}
-	
-	TaskListPersistException( String message ) {
-		super("系统在保存工作任务列表信息时发生异常。Message:" + message );
-	}
-}

+ 0 - 20
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/TaskListQueryException.java

@@ -1,20 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.list;
-
-import com.x.base.core.project.exception.PromptException;
-
-class TaskListQueryException extends PromptException {
-
-	private static final long serialVersionUID = 1859164370743532895L;
-
-	TaskListQueryException( String message ) {
-		super(message );
-	}
-	
-	TaskListQueryException( Throwable e ) {
-		super("系统在查询工作任务列表信息时发生异常。" , e );
-	}
-	
-	TaskListQueryException( Throwable e, String message ) {
-		super("系统在查询工作任务列表信息时发生异常。Message:" + message, e );
-	}
-}

+ 0 - 195
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/list/WoTaskSimple.java

@@ -1,195 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.list;
-
-import java.util.Date;
-
-import com.x.base.core.project.annotation.FieldDescribe;
-
-public class WoTaskSimple {
-	
-	@FieldDescribe("数据库主键,自动生成.")
-	private String id ;
-	
-	@FieldDescribe("所属项目ID.")
-	private String project;
-
-	@FieldDescribe("所属项目名称.")
-	private String projectName;
-
-	@FieldDescribe("父级工作任务ID.")
-	private String parent;	
-
-	@FieldDescribe("工作任务名称(40字)")
-	private String name;
-
-	@FieldDescribe("工作任务概括(80字)")
-	private String summay;
-
-	@FieldDescribe("工作开始时间")
-	private Date startTime;
-
-	@FieldDescribe("工作开始时间")
-	private Date endTime;
-
-	@FieldDescribe("工作等级:普通 | 紧急 | 特急")
-	private String priority = "普通";
-
-	@FieldDescribe("工作状态:执行中- processing | 已完成- completed | 已归档- archived")
-	private String workStatus = "processing";
-
-	@FieldDescribe("是否已完成")
-	private Boolean completed = false;
-
-	@FieldDescribe("是否已认领")
-	private Boolean claimed = false;
-
-	@FieldDescribe("是否已超时")
-	private Boolean overtime = false;
-
-	@FieldDescribe("是否已经归档")
-	private Boolean archive = false;
-
-	@FieldDescribe("工作进度:记录4位数,显示的时候除以100")
-	private Integer progress = 0;
-
-	@FieldDescribe("执行者和负责人")
-	private String executor;	
-
-	@FieldDescribe("创建者,可能为System,如果由系统创建。")
-	private String creatorPerson;
-
-	public String getId() {
-		return id;
-	}
-
-	public void setId(String id) {
-		this.id = id;
-	}
-
-	public String getProject() {
-		return project;
-	}
-
-	public void setProject(String project) {
-		this.project = project;
-	}
-
-	public String getProjectName() {
-		return projectName;
-	}
-
-	public void setProjectName(String projectName) {
-		this.projectName = projectName;
-	}
-
-	public String getParent() {
-		return parent;
-	}
-
-	public void setParent(String parent) {
-		this.parent = parent;
-	}
-
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getSummay() {
-		return summay;
-	}
-
-	public void setSummay(String summay) {
-		this.summay = summay;
-	}
-
-	public Date getStartTime() {
-		return startTime;
-	}
-
-	public void setStartTime(Date startTime) {
-		this.startTime = startTime;
-	}
-
-	public Date getEndTime() {
-		return endTime;
-	}
-
-	public void setEndTime(Date endTime) {
-		this.endTime = endTime;
-	}
-
-	public String getPriority() {
-		return priority;
-	}
-
-	public void setPriority(String priority) {
-		this.priority = priority;
-	}
-
-	public String getWorkStatus() {
-		return workStatus;
-	}
-
-	public void setWorkStatus(String workStatus) {
-		this.workStatus = workStatus;
-	}
-
-	public Boolean getCompleted() {
-		return completed;
-	}
-
-	public void setCompleted(Boolean completed) {
-		this.completed = completed;
-	}
-
-	public Boolean getClaimed() {
-		return claimed;
-	}
-
-	public void setClaimed(Boolean claimed) {
-		this.claimed = claimed;
-	}
-
-	public Boolean getOvertime() {
-		return overtime;
-	}
-
-	public void setOvertime(Boolean overtime) {
-		this.overtime = overtime;
-	}
-
-	public Boolean getArchive() {
-		return archive;
-	}
-
-	public void setArchive(Boolean archive) {
-		this.archive = archive;
-	}
-
-	public Integer getProgress() {
-		return progress;
-	}
-
-	public void setProgress(Integer progress) {
-		this.progress = progress;
-	}
-
-	public String getExecutor() {
-		return executor;
-	}
-
-	public void setExecutor(String executor) {
-		this.executor = executor;
-	}
-
-	public String getCreatorPerson() {
-		return creatorPerson;
-	}
-
-	public void setCreatorPerson(String creatorPerson) {
-		this.creatorPerson = creatorPerson;
-	}
-}

+ 0 - 136
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/project/ActionDelete.java

@@ -1,136 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.project;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.entity.JpaObject;
-import com.x.base.core.project.annotation.FieldDescribe;
-import com.x.base.core.project.bean.WrapCopier;
-import com.x.base.core.project.bean.WrapCopierFactory;
-import com.x.base.core.project.cache.ApplicationCache;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoId;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.teamwork.assemble.control.service.BatchOperationPersistService;
-import com.x.teamwork.assemble.control.service.BatchOperationProcessService;
-import com.x.teamwork.core.entity.Dynamic;
-import com.x.teamwork.core.entity.Project;
-import com.x.teamwork.core.entity.ProjectGroup;
-import com.x.teamwork.core.entity.Task;
-
-public class ActionDelete extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionDelete.class);
-
-	protected ActionResult<Wo> execute(HttpServletRequest request, EffectivePerson effectivePerson, String projectId ) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		Project project = null;
-		Boolean check = true;
-		Wo wo = new Wo();
-
-		if ( StringUtils.isEmpty( projectId ) ) {
-			check = false;
-			Exception exception = new ProjectFlagForQueryEmptyException();
-			result.error( exception );
-		}
-
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				project = projectQueryService.get(projectId);
-				if ( project == null) {
-					check = false;
-					Exception exception = new ProjectNotExistsException(projectId);
-					result.error( exception );
-				}
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ProjectQueryException(e, "根据指定flag查询项目信息对象时发生异常。projectId:" + projectId);
-				result.error(exception);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				projectPersistService.delete( projectId, effectivePerson );				
-				// 更新缓存
-				ApplicationCache.notify( ProjectGroup.class );
-				ApplicationCache.notify( Task.class );
-				ApplicationCache.notify( Project.class );
-				
-				wo.setId( project.getId() );
-				
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ProjectQueryException(e, "根据指定flag删除项目信息对象时发生异常。projectId:" + projectId);
-				result.error(exception);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}		
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {					
-				new BatchOperationPersistService().addOperation( 
-						BatchOperationProcessService.OPT_OBJ_PROJECT, 
-						BatchOperationProcessService.OPT_TYPE_DELETE,  projectId,  projectId, "刷新文档权限:ID=" +  projectId );
-			} catch (Exception e) {
-				logger.error(e, effectivePerson, request, null);
-			}	
-		}
-		
-		if( Boolean.TRUE.equals( check ) ){
-			try {					
-				Dynamic dynamic = dynamicPersistService.projectDeleteDynamic( project, effectivePerson);
-				if( dynamic != null ) {
-					List<WoDynamic> dynamics = new ArrayList<>();
-					dynamics.add( WoDynamic.copier.copy( dynamic ) );
-					if( wo != null ) {
-						wo.setDynamics(dynamics);
-					}
-				}
-			} catch (Exception e) {
-				logger.error(e, effectivePerson, request, null);
-			}	
-		}
-		result.setData( wo );
-		return result;
-	}
-
-	public static class Wo extends WoId {
-		
-		@FieldDescribe("操作引起的动态内容")
-		List<WoDynamic> dynamics = new ArrayList<>();
-
-		public List<WoDynamic> getDynamics() {
-			return dynamics;
-		}
-
-		public void setDynamics(List<WoDynamic> dynamics) {
-			this.dynamics = dynamics;
-		}
-		
-	}
-	
-	public static class WoDynamic extends Dynamic{
-
-		private static final long serialVersionUID = -5076990764713538973L;
-
-		public static WrapCopier<Dynamic, WoDynamic> copier = WrapCopierFactory.wo( Dynamic.class, WoDynamic.class, null, JpaObject.FieldsInvisible);
-		
-		private Long rank = 0L;
-
-		public Long getRank() {
-			return rank;
-		}
-
-		public void setRank(Long rank) {
-			this.rank = rank;
-		}		
-	}
-}

+ 0 - 66
o2server/x_teamwork_assemble_control/src/main/java/com/x/teamwork/assemble/control/jaxrs/project/ActionStar.java

@@ -1,66 +0,0 @@
-package com.x.teamwork.assemble.control.jaxrs.project;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.commons.lang3.StringUtils;
-
-import com.x.base.core.project.cache.ApplicationCache;
-import com.x.base.core.project.http.ActionResult;
-import com.x.base.core.project.http.EffectivePerson;
-import com.x.base.core.project.jaxrs.WoId;
-import com.x.base.core.project.logger.Logger;
-import com.x.base.core.project.logger.LoggerFactory;
-import com.x.teamwork.core.entity.Project;
-
-public class ActionStar extends BaseAction {
-
-	private static Logger logger = LoggerFactory.getLogger(ActionStar.class);
-
-	protected ActionResult<Wo> execute(HttpServletRequest request, EffectivePerson effectivePerson, String flag) throws Exception {
-		ActionResult<Wo> result = new ActionResult<>();
-		Project project = null;
-		Boolean check = true;
-
-		if ( StringUtils.isEmpty( flag ) ) {
-			check = false;
-			Exception exception = new ProjectFlagForQueryEmptyException();
-			result.error( exception );
-		}
-
-		if( Boolean.TRUE.equals( check ) ){
-			try {
-				project = projectQueryService.get(flag);
-				if ( project == null) {
-					check = false;
-					Exception exception = new ProjectNotExistsException(flag);
-					result.error( exception );
-				}
-			} catch (Exception e) {
-				check = false;
-				Exception exception = new ProjectQueryException(e, "根据指定flag查询应用项目信息对象时发生异常。flag:" + flag);
-				result.error(exception);
-				logger.error(e, effectivePerson, request, null);
-			}
-		}
-		
-		try {					
-			projectPersistService.star( flag,  effectivePerson );
-			
-			// 更新缓存
-			ApplicationCache.notify( Project.class );
-			Wo wo = new Wo();
-			wo.setId( project.getId() );
-			result.setData( wo );
-		} catch (Exception e) {
-			check = false;
-			Exception exception = new ProjectPersistException(e, "项目信息保存时发生异常。");
-			result.error(exception);
-			logger.error(e, effectivePerson, request, null);
-		}
-		return result;
-	}
-
-	public static class Wo extends WoId {
-
-	}
-}

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