Browse Source

Merge branch 'master' of http://www.kingtomtech.com:10101/kingtom/tip-cq-kaizhou

King 8 months ago
parent
commit
a5ea5b1a44
31 changed files with 323 additions and 112 deletions
  1. 3 0
      02-script/sql/v1.6_updateTaskProcessSummary.sql
  2. 5 4
      tc-service/tap-goal/src/main/java/com/minto/app/goal/dao/GoalCommonDaoImpl.java
  3. 9 3
      tc-service/tap-project/src/main/java/com/minto/app/project/mapper/IProjectMapper.xml
  4. 1 0
      tc-service/tap-project/src/main/java/com/minto/app/project/project.review.sql.xml
  5. 1 1
      tc-service/tap-project/src/main/java/com/minto/app/project/service/impl/ProjectReviewServiceImpl.java
  6. 4 3
      tc-service/tap-task/src/main/java/com/minto/app/task/beans/task_process_summary.hbm.xml
  7. 2 0
      tc-service/tap-task/src/main/java/com/minto/app/task/dao/ITaskProcessSummaryDao.java
  8. 5 5
      tc-service/tap-task/src/main/java/com/minto/app/task/dao/MessageAndCommentDaoImpl.java
  9. 1 0
      tc-service/tap-task/src/main/java/com/minto/app/task/dao/TaskCommonDaoImpl.java
  10. 2 1
      tc-service/tap-task/src/main/java/com/minto/app/task/dao/TaskMemberDaoImpl.java
  11. 25 0
      tc-service/tap-task/src/main/java/com/minto/app/task/dao/TaskProcessSummaryDaoImpl.java
  12. 10 5
      tc-service/tap-task/src/main/java/com/minto/app/task/dao/TaskSummaryDaoImpl.java
  13. 56 11
      tc-service/tap-task/src/main/java/com/minto/app/task/manager/TaskManagerImpl.java
  14. 6 0
      tc-service/tap-task/src/main/java/com/minto/app/task/mapper/ITaskAnalysisMapper.xml
  15. 5 3
      tc-service/tap-task/src/main/java/com/minto/app/task/mapper/ITaskSummaryMapper.xml
  16. 5 3
      tc-service/tap-workbrain/src/main/java/com/minto/app/workbrain/chat.sql.xml
  17. 1 0
      tip-api/src/main/java/com/minto/app/behavior/enums/BehaviorEnum.java
  18. 1 1
      tip-api/src/main/java/com/minto/app/behavior/manager/IBehManager.java
  19. 14 0
      tip-api/src/main/java/com/minto/app/task/beans/TaskProcessSummaryBean.java
  20. 1 1
      tip-api/src/main/java/com/minto/app/task/manager/ITaskManager.java
  21. 43 27
      tip-api/src/main/java/com/minto/app/task/util/TaskTransverter.java
  22. 14 8
      tip-bff/src/main/java/com/minto/bff/beh.sql.xml
  23. 2 1
      tip-front/src/main/java/com/minto/app/task/controller/MtTaskController.java
  24. 16 15
      tip-front/src/main/java/com/minto/app/task/controller/TaskByTypeController.java
  25. 4 3
      tip-front/src/main/java/com/minto/app/task/controller/TaskController.java
  26. 56 3
      tip-front/src/main/java/com/minto/app/task/util/TaskKaizhouUtil.java
  27. 2 1
      tip-front/src/main/java/com/minto/web/tc/dataserver/TcRecommendController.java
  28. 22 8
      tip-front/src/main/webapp/tc_suite/taskmt/doTaskIndex.jsp
  29. BIN
      tip-front/src/main/webapp/tc_suite/taskmt/img/withdrawn.png
  30. 5 3
      tip-front/src/main/webapp/tc_suite/taskmt/taskMessageList.jsp
  31. 2 2
      tip-service/tip-common/src/main/java/com/minto/app/behavior/manager/BehManagerImpl.java

+ 3 - 0
02-script/sql/v1.6_updateTaskProcessSummary.sql

@@ -0,0 +1,3 @@
+--增加字段:批示留言是否已删除
+ALTER TABLE "public"."task_process_summary" ADD COLUMN "is_deleted" int2 DEFAULT 0;
+COMMENT ON COLUMN "public"."task_process_summary"."is_deleted" IS '批示留言是否删除,默认0';

+ 5 - 4
tc-service/tap-goal/src/main/java/com/minto/app/goal/dao/GoalCommonDaoImpl.java

@@ -251,6 +251,7 @@ public class GoalCommonDaoImpl extends BaseDaoImpl implements GoalCommonDao {
         temp.append(" SELECT * ");
         temp.append(" FROM beh_summary ");
         temp.append(" where belong_to_res_id = :pid ");
+        temp.append(" and b_state = 0 ");
         temp.append(" and belong_to_res_type = 10000003 ");
         if(CollectionUtil.isNotEmpty(subTypes)){
             temp.append(" and sub_type in ( :subTypes) ");
@@ -278,7 +279,7 @@ public class GoalCommonDaoImpl extends BaseDaoImpl implements GoalCommonDao {
                 case "tip_qpm":
                 case "tip_goal":
                     //督办业务统一处理
-                    temp.append(" WHERE to_char(create_time,'yyyy') = :year AND res_id IN ( ");
+                    temp.append(" WHERE b_state = 0 AND to_char(create_time,'yyyy') = :year AND res_id IN ( ");
                     temp.append("   SELECT DISTINCT res_id FROM beh_summary ");
                     temp.append("   WHERE belong_to_res_id = :pid ");
                     temp.append("   OR position( cast( :pid as VARCHAR ) in ext1) >= 1 ");
@@ -300,7 +301,7 @@ public class GoalCommonDaoImpl extends BaseDaoImpl implements GoalCommonDao {
                     break;
                 case "tip_project":
                     //重大项目单独处理
-                    temp.append(" WHERE to_char(create_time,'yyyy') = :year AND  res_id IN ( ");
+                    temp.append(" WHERE b_state = 0 AND to_char(create_time,'yyyy') = :year AND  res_id IN ( ");
                     temp.append("   SELECT DISTINCT res_id FROM beh_summary ");
                     temp.append("   WHERE belong_to_res_id = :pid ");
                     temp.append("   OR position( cast( :pid as VARCHAR ) in ext1) >= 1 ");
@@ -329,7 +330,7 @@ public class GoalCommonDaoImpl extends BaseDaoImpl implements GoalCommonDao {
             //查询全部
             temp.append(" UNION ");
             temp.append(" SELECT * FROM beh_summary ");
-            temp.append(" WHERE  to_char(create_time,'yyyy') = :year ");
+            temp.append(" WHERE b_state = 0 AND to_char(create_time,'yyyy') = :year ");
             if (CollectionUtil.isNotEmpty(exclusive)){
                 temp.append(" and beh_type not in ( :exclusive) ");
             }
@@ -350,7 +351,7 @@ public class GoalCommonDaoImpl extends BaseDaoImpl implements GoalCommonDao {
             //加入任务成员查询相关的
             temp.append(" UNION ");
             temp.append(" SELECT * FROM beh_summary ");
-            temp.append(" WHERE to_char(create_time,'yyyy') = :year   ");
+            temp.append(" WHERE b_state = 0 AND to_char(create_time,'yyyy') = :year   ");
             if(CollectionUtil.isNotEmpty(neSubTypes)){
                 temp.append(" AND sub_type not in ( :neSubTypes)  ");
             }

+ 9 - 3
tc-service/tap-project/src/main/java/com/minto/app/project/mapper/IProjectMapper.xml

@@ -570,11 +570,12 @@
         FROM task_process_summary
         WHERE 1=1
 -- 	        process_date = (
--- 	            SELECT MAX ( process_date ) FROM task_process_summary WHERE ptype = 0 AND person_id = #{leaderId} AND task_id = #{projId} AND is_published = 1
+-- 	            SELECT MAX ( process_date ) FROM task_process_summary WHERE ptype = 0 AND person_id = #{leaderId} AND task_id = #{projId} AND is_published = 1 AND is_deleted = 0
 -- 	        )
 	    AND ptype = 0 --常规处理
 	    AND person_id = #{leaderId}
         AND is_published = 1
+        AND is_deleted = 0
 	    AND task_id = #{projId}   -- 这里指的是项目的id
 	    order by process_date desc limit 1
     </select>
@@ -2568,6 +2569,7 @@
                     select 1 from  task_process_summary t
                     where p.id = t.task_id
                     and t.is_published = 1
+                    and t.is_deleted = 0
                     <if test="personId != null">
                         <foreach collection="personId" item="pid" separator="," open="AND t.person_id in (" close=")">
                             #{pid}
@@ -2630,12 +2632,14 @@
                 task_process_summary
             WHERE
                 ( task_id, process_date ) IN ( SELECT task_id, MAX ( process_date ) process_date FROM
-                    task_process_summary WHERE person_id = #{personId,jdbcType=BIGINT} AND is_published = 1 GROUP BY task_id )
+                    task_process_summary WHERE person_id = #{personId,jdbcType=BIGINT} AND is_published = 1 AND
+                    is_deleted = 0 GROUP BY task_id )
             ) b ON A.task_id = b.task_id
         WHERE
             A.process_date BETWEEN #{startTime,jdbcType=TIMESTAMP} and #{endTime,jdbcType=TIMESTAMP}
             AND A.person_id = #{personId,jdbcType=BIGINT}
             AND A.is_published = 1
+            and A.is_deleted = 0
         GROUP BY
             b.task_id,
             b.opinion
@@ -2710,7 +2714,7 @@
         select p.id "projectId",p.title "projectTitle",t.report_count,m.manager "projectManager",p.lib_type "libTypeId" from dm_dtab_project_summary p
                   left join (select m.proj_id,string_agg(concat(m.resource_type,'_',m.resource_id),',') manager from project_member m where m.relation_type = 1 GROUP BY m.proj_id) m on p.id = m.proj_id
                   left join (select t.task_id,count(t.id) report_count from task_process_summary t where t.person_id
-        = #{personId} and t.is_published = 1 GROUP BY t.task_id) t on p.id = t.task_id
+        = #{personId} and t.is_published = 1 and t.is_deleted = 0 GROUP BY t.task_id) t on p.id = t.task_id
         where p.proj_status != -1 AND EXISTS (select 1 from project_member pm
                       where pm.resource_id = #{personId} and p.id = pm.proj_id)
     </select>
@@ -2801,6 +2805,7 @@
             task_process_summary ts
             WHERE
             ts.is_published = 1
+            AND ts.is_deleted = 0
             AND ts.ID IN (
             SELECT CAST
             ( ext1 AS BIGINT )
@@ -2903,6 +2908,7 @@
         WHERE
         ts.task_id = #{referenceId}
         AND ts.is_published = 1
+        AND ts.is_deleted = 0
         AND ts.ID IN (
         SELECT CAST
         ( ext1 AS BIGINT )

+ 1 - 0
tc-service/tap-project/src/main/java/com/minto/app/project/project.review.sql.xml

@@ -17,6 +17,7 @@
                 from task_process_summary a
                 where a.task_id = :projectId
                 and a.is_published = 1
+                and a.is_deleted = 0
                 group by  to_char(a.process_date ,'yyyy-MM')
                 order by  "createTime" asc;
             ]]>

+ 1 - 1
tc-service/tap-project/src/main/java/com/minto/app/project/service/impl/ProjectReviewServiceImpl.java

@@ -351,7 +351,7 @@ public class ProjectReviewServiceImpl implements ProjectReviewService {
         Map<String,Object> sqlParams = Maps.newHashMap();
         sqlParams.put("projectId", projectId);
         var commentCount = sqlToyLazyDao.getCount("select count(id) from task_process_summary where "
-                + "task_id=:projectId and is_published = 1", sqlParams);
+                + "task_id=:projectId and is_published = 1 and is_deleted = 0", sqlParams);
         param.put("commentCount", commentCount);
 
         var reportCount = sqlToyLazyDao.getCount("select count(id) from dm_dtab_project_report_extend where reference_id=:projectId", sqlParams);

+ 4 - 3
tc-service/tap-task/src/main/java/com/minto/app/task/beans/task_process_summary.hbm.xml

@@ -25,6 +25,7 @@
 		<property column="process_resource_id" length="19" name="processResourceId" not-null="false" type="java.lang.Long" />
 		<property column="process_stage_id" length="19" name="processStageId" not-null="false" type="java.lang.Long" />
 		<property column="is_published" length="10" name="isPublished" not-null="true" type="java.lang.Integer" />
+		<property column="is_deleted" length="10" name="isDeleted" not-null="true" type="java.lang.Integer" />
 		<property column="visibility_scope"  name="visibilityScope" not-null="false" type="java.lang.String" />
 	</class>
     <query name="Task.deleteTaskProcessByTaskId">
@@ -36,7 +37,7 @@
 	<query name="Task.findTaskProcessOfLastedByTaskId">
 		<![CDATA[
 			from TaskProcessSummaryBean where processDate in (
-				select max(processDate) from TaskProcessSummaryBean where taskId in (:taskIds) and isPublished = 1 and id not in(:ids) group by taskId)
+				select max(processDate) from TaskProcessSummaryBean where taskId in (:taskIds) and isPublished = 1 and isDelete = 0 and id not in(:ids) group by taskId)
 		]]>
 	</query>
 	<query name="Task.findTaskProcessByTaskId">
@@ -46,12 +47,12 @@
 	</query>
 	<query name="Task.findTaskProcessByParentId">
 		<![CDATA[
-			from TaskProcessSummaryBean where parentId in (:parentIds) and isPublished = 1
+			from TaskProcessSummaryBean where parentId in (:parentIds) and isPublished = 1 and isDeleted = 0
 		]]>
 	</query>
 	<query name="Task.findTaskProcessCountByTaskId">
 		<![CDATA[
-			select count(id) from TaskProcessSummaryBean where taskId =:taskId and parentId=0 and isPublished = 1
+			select count(id) from TaskProcessSummaryBean where taskId =:taskId and parentId=0 and isPublished = 1 and isDelete = 0
 		]]>
 	</query>
 </hibernate-mapping>

+ 2 - 0
tc-service/tap-task/src/main/java/com/minto/app/task/dao/ITaskProcessSummaryDao.java

@@ -183,4 +183,6 @@ public interface ITaskProcessSummaryDao extends BaseDao {
      * @return
      */
     List<Map<String,Object>> findFilesByRelation(Long taskId, Long processSummaryBeanId);
+
+    void deleteByLogic(Long itemId);
 }

+ 5 - 5
tc-service/tap-task/src/main/java/com/minto/app/task/dao/MessageAndCommentDaoImpl.java

@@ -51,7 +51,7 @@ public class MessageAndCommentDaoImpl extends BaseDaoImpl implements IMessageAnd
         hql.append(" )");
         hql.append(" )");
         hql.append(" and exists ( select 1 from TaskProcessSummaryBean tps where  tps.taskId = t.id and tps"
-                + ".isPublished = 1 ");
+                + ".isPublished = 1 and tps.isDelete = 0 ");
         //查询是否存在领导评论和留言
         if(isComments == 1 || isMessage == 1){
         	hql.append("and ( ");
@@ -90,8 +90,8 @@ public class MessageAndCommentDaoImpl extends BaseDaoImpl implements IMessageAnd
     public List<Map<String, Object>> getTaskProcessSummaryBeanByTaskID(Long taskID) {
         StringBuffer hql = new StringBuffer();
         hql.append("select p.pname as name,t.ptype as ptype,t.opinion as opinion,t.processDate as processDate ");
-        hql.append(" from TaskProcessSummaryBean t,OrgPersonBean p where  t.personId = p.id and t.isPublished = 1 and t"
-                + ".taskId = "+taskID);
+        hql.append(" from TaskProcessSummaryBean t,OrgPersonBean p where  t.personId = p.id and t.isPublished = 1 and"
+                + " t.isDelete = 0 and t.taskId = "+taskID);
         hql.append(" order by t.processDate desc");
         return getHibernateTpl().findBy(hql.toString());
     }
@@ -101,8 +101,8 @@ public class MessageAndCommentDaoImpl extends BaseDaoImpl implements IMessageAnd
         if(CollectionUtil.isNotEmpty(taskId)){
             StringBuffer hql = new StringBuffer();
             hql.append("select p.pname as name,p.id as pid,t.ptype as ptype,t.opinion as opinion,t.processDate as processDate,t.taskId as taskId ");
-            hql.append(" from TaskProcessSummaryBean t,OrgPersonBean p where  t.personId = p.id and t.isPublished = 1 "
-                    + "and t.taskId in (:taskId)");
+            hql.append(" from TaskProcessSummaryBean t,OrgPersonBean p where  t.personId = p.id and t.isPublished = 1"
+                    + " and t.isDelete = 0 and t.taskId in (:taskId)");
             if(ptype!=null){
                 hql.append(" and t.ptype in (:ptype)");
             }

+ 1 - 0
tc-service/tap-task/src/main/java/com/minto/app/task/dao/TaskCommonDaoImpl.java

@@ -291,6 +291,7 @@ public class TaskCommonDaoImpl extends BaseDaoImpl implements ITaskCommonDao {
                 .append(" p.task_id || '' = b.res_id ")
                 .append(" and p.parent_id = 0 ")
                 .append(" and p.is_published = 1 ")
+                .append(" and p.is_deleted = 0 ")
                 .append(") else 1 = 1 end");
         return builder;
     }

+ 2 - 1
tc-service/tap-task/src/main/java/com/minto/app/task/dao/TaskMemberDaoImpl.java

@@ -124,8 +124,9 @@ public class TaskMemberDaoImpl extends BaseDaoImpl implements ITaskMemberDao {
         hql.append(" FROM task_process_summary T ");
         hql.append(" WHERE T.task_id =  " + taskid);
         hql.append(" AND T.is_published = 1");
+        hql.append(" AND T.is_deleted = 0");
         hql.append(" AND T.process_date = ( ");
-        hql.append(" SELECT max (process_date) FROM task_process_summary WHERE is_published = 1 )" );
+        hql.append(" SELECT max (process_date) FROM task_process_summary WHERE is_published = 1 AND is_deleted = 0)" );
         List<TaskProcessSummaryBean> l = getHibernateTpl().queryBeanBySql(hql.toString(), TaskProcessSummaryBean.class, null);
         if (CollectionUtil.isNotEmpty(l)) {
             return l.get(0);

+ 25 - 0
tc-service/tap-task/src/main/java/com/minto/app/task/dao/TaskProcessSummaryDaoImpl.java

@@ -11,6 +11,7 @@ import java.util.Map;
 
 import com.minto.app.resource.enums.ResourceEnum;
 import com.minto.app.task.beans.TaskProcessSummaryBean;
+import com.minto.core.base.BaseEnum;
 import com.minto.core.util.MapUtil;
 import com.minto.core.util.ParameterUtil;
 import com.google.common.collect.Maps;
@@ -57,6 +58,7 @@ public class TaskProcessSummaryDaoImpl extends BaseDaoImpl implements ITaskProce
     public ListObject<TaskProcessSummaryBean> findTaskProcesssByTaskId(Long taskId, Integer start, Integer range) {
         Criterion criterion = Restrictions.eq("taskId", taskId);
         criterion = Restrictions.and(criterion, Restrictions.eq("isPublished", 1));
+        criterion = Restrictions.and(criterion, Restrictions.eq("isDeleted", 0));
         return getHibernateTpl().queryPage(TaskProcessSummaryBean.class,criterion, start, range , Order.desc("processDate"));
     }
 
@@ -83,6 +85,7 @@ public class TaskProcessSummaryDaoImpl extends BaseDaoImpl implements ITaskProce
         if(ArrayUtil.isNotEmpty(taskIds)){
             Criterion criterion = Restrictions.in("taskId", taskIds);
             criterion = Restrictions.and(criterion, Restrictions.eq("isPublished", 1));
+            criterion = Restrictions.and(criterion, Restrictions.eq("isDeleted", 0));
             result = getHibernateTpl().query(TaskProcessSummaryBean.class, criterion, Order.desc("processDate"));
         }
         return result;
@@ -128,6 +131,12 @@ public class TaskProcessSummaryDaoImpl extends BaseDaoImpl implements ITaskProce
                     criterion = Restrictions.and(criterion, Restrictions.eq("isPublished", isPublished));
                 }
             }
+            if(conditionMap.containsKey("isDeleted")){
+                Integer isDeleted = ParameterUtil.getInteger(conditionMap, "isDeleted");
+                if(isDeleted != null){
+                    criterion = Restrictions.and(criterion, Restrictions.eq("isDeleted", isDeleted));
+                }
+            }
         }
         Order processDate = Order.desc("processDate");
         // 如果是查询下级留言,就采用从大到小的顺序
@@ -137,6 +146,9 @@ public class TaskProcessSummaryDaoImpl extends BaseDaoImpl implements ITaskProce
         if(!conditionMap.containsKey("isPublished")){
             criterion = Restrictions.and(criterion, Restrictions.eq("isPublished", 1));
         }
+        if(!conditionMap.containsKey("isDeleted")){
+            criterion = Restrictions.and(criterion, Restrictions.eq("isDeleted", 0));
+        }
         return getHibernateTpl().queryPage(TaskProcessSummaryBean.class, criterion, start, range,processDate );
     }
 
@@ -145,6 +157,7 @@ public class TaskProcessSummaryDaoImpl extends BaseDaoImpl implements ITaskProce
 			Long taskId, java.util.Date readDate,Integer pageSize,Integer pageIndex) {
 		Criterion criterion = Restrictions.eq("taskId", taskId);
         criterion = Restrictions.and(criterion, Restrictions.eq("isPublished", 1));
+        criterion = Restrictions.and(criterion, Restrictions.eq("isDeleted", 0));
 		if(readDate != null){
 		    criterion = Restrictions.and(criterion, Restrictions.ge("processDate", readDate));
 		}
@@ -160,6 +173,7 @@ public class TaskProcessSummaryDaoImpl extends BaseDaoImpl implements ITaskProce
     public List<TaskProcessSummaryBean> findTaskProcessByProResourceId(Long taskId , Long processResourceId)throws BusinessException{
         Criterion criterion = Restrictions.and(Restrictions.eq("taskId", taskId), Restrictions.eq("processResourceId", processResourceId));
         criterion = Restrictions.and(criterion, Restrictions.eq("isPublished", 1));
+        criterion = Restrictions.and(criterion, Restrictions.eq("isDeleted", 0));
         return getHibernateTpl().query(TaskProcessSummaryBean.class, criterion, Order.desc("processDate"));
     }
 
@@ -167,6 +181,7 @@ public class TaskProcessSummaryDaoImpl extends BaseDaoImpl implements ITaskProce
     public Integer findTaskProcessCountByTaskIdAndReadDate(Long taskId, java.util.Date readDat) {
         Criterion criterion = Restrictions.eq("taskId", taskId);
         criterion = Restrictions.and(criterion, Restrictions.eq("isPublished", 1));
+        criterion = Restrictions.and(criterion, Restrictions.eq("isDeleted", 0));
         if(readDat != null) {
             criterion = Restrictions.and(criterion, Restrictions.ge("readDat", readDat));
         }
@@ -181,6 +196,7 @@ public class TaskProcessSummaryDaoImpl extends BaseDaoImpl implements ITaskProce
     public List<TaskProcessSummaryBean> findTaskProcessByTaskIdsAndPtype(Long[] aids, Integer ptype) {
         Criterion criterion = Restrictions.and(Restrictions.in("taskId", aids), Restrictions.eq("ptype", ptype));
         criterion = Restrictions.and(criterion, Restrictions.eq("isPublished", 1));
+        criterion = Restrictions.and(criterion, Restrictions.eq("isDeleted", 0));
         return getHibernateTpl().query(TaskProcessSummaryBean.class, criterion, Order.desc("processDate"));
     }
 
@@ -188,6 +204,7 @@ public class TaskProcessSummaryDaoImpl extends BaseDaoImpl implements ITaskProce
     public Integer findTaskProcessNewestCount(Long taskId, java.util.Date lastDate) {
     	  Criterion criterion = Restrictions.eq("taskId", taskId);
         criterion = Restrictions.and(criterion, Restrictions.eq("isPublished", 1));
+        criterion = Restrictions.and(criterion, Restrictions.eq("isDeleted", 0));
     	if (lastDate != null) {
 			criterion = Restrictions.and(criterion, Restrictions.ge("processDate", lastDate));
 		}
@@ -198,6 +215,7 @@ public class TaskProcessSummaryDaoImpl extends BaseDaoImpl implements ITaskProce
 	public List<TaskProcessSummaryBean> findTaskProcessByIds(Long[] ids, Integer[] types) {
 		Criterion c = Restrictions.and(Restrictions.in("id", ids), Restrictions.in("ptype", types));
         c = Restrictions.and(c, Restrictions.eq("isPublished", 1));
+        c = Restrictions.and(c, Restrictions.eq("isDeleted", 0));
 		return getHibernateTpl().query(TaskProcessSummaryBean.class, c, Order.desc("processDate"));
 	}
 
@@ -220,4 +238,11 @@ public class TaskProcessSummaryDaoImpl extends BaseDaoImpl implements ITaskProce
                 " )";
         return getHibernateTpl().findBy(hql,params,true);
     }
+
+    @Override
+    public void deleteByLogic(Long itemId){
+        TaskProcessSummaryBean taskProcessById = findTaskProcessById(itemId);
+        taskProcessById.setIsDeleted(BaseEnum.BooleanEnum.True.getKey());
+        update(taskProcessById);
+    }
 }

+ 10 - 5
tc-service/tap-task/src/main/java/com/minto/app/task/dao/TaskSummaryDaoImpl.java

@@ -1647,7 +1647,8 @@ public class TaskSummaryDaoImpl extends BaseDaoImpl implements ITaskSummaryDao {
     public int getTaskCountByPersonIds(Long [] pids,String type,boolean isKeyProject) throws BusinessException {
         StringBuffer sb = new StringBuffer(" select count(*) from");
         sb.append(" (select DISTINCT t.* from task_summary t")
-                .append(" left join task_process_summary tps on t.id = tps.task_id and tps.is_published = 1 ");
+                .append(" left join task_process_summary tps on t.id = tps.task_id and tps.is_published = 1 and tps"
+                        + ".is_deleted = 0 ");
         if(isKeyProject){
             sb.append(" left join task_type tt on cast(t.tasktype_id as int8)=tt.id ");
         }
@@ -1688,7 +1689,8 @@ public class TaskSummaryDaoImpl extends BaseDaoImpl implements ITaskSummaryDao {
     public ListObject<TaskSummaryBean> pagedTaskCountByPersonIds(Long [] pids,String type,boolean isKeyProject,int start, int range) throws BusinessException {
         StringBuffer sb = new StringBuffer(" select * from");
         sb.append(" (select DISTINCT t.* from task_summary t")
-                .append(" left join task_process_summary tps on t.id = tps.task_id and tps.is_published = 1 ");
+                .append(" left join task_process_summary tps on t.id = tps.task_id and tps.is_published = 1 and tps"
+                        + ".is_deleted = 0 ");
         if(isKeyProject){
             sb.append(" left join task_type tt on cast(t.tasktype_id as int8)=tt.id ");
         }
@@ -1858,7 +1860,8 @@ public class TaskSummaryDaoImpl extends BaseDaoImpl implements ITaskSummaryDao {
     public ListObject<TaskSummaryBean> pagedTaskSummarysByTaskTypeIdAndPids(long taskTypeId, boolean isKeyProject, String type, Long[] pids, int start, int range, Map<String, Object> params) throws BusinessException {
         StringBuffer sb = new StringBuffer();
         sb.append(" select DISTINCT t.* from task_summary t ")
-                .append(" left join task_process_summary tps on t.id = tps.task_id and t.is_published = 1 ");
+                .append(" left join task_process_summary tps on t.id = tps.task_id and tps.is_published = 1 and tps"
+                        + ".is_deleted = 0 ");
         if(isKeyProject){
             sb.append(" left join task_type tt ON CAST (t.tasktype_id AS int8) = tt.id ");
         }
@@ -1908,7 +1911,8 @@ public class TaskSummaryDaoImpl extends BaseDaoImpl implements ITaskSummaryDao {
         StringBuffer sb = new StringBuffer(" select tt.name,tt.id from ");
         sb.append(" (select t1.tasktype_id type_id from ")
                 .append(" (select DISTINCT t.* from task_summary t ")
-                .append(" left join task_process_summary tps on t.id = tps.task_id and tps.is_published = 1 ")
+                .append(" left join task_process_summary tps on t.id = tps.task_id and tps.is_published = 1 and tps"
+                        + ".is_deleted = 0 ")
                 .append(" where exists (select * from task_member m ")
                 .append(" where m.task_id=t.id ")
                 .append(" and m.resource_type=10000003 ")
@@ -1938,7 +1942,8 @@ public class TaskSummaryDaoImpl extends BaseDaoImpl implements ITaskSummaryDao {
     public int getTaskCountByTypeIdAndPersonIds(long typeId, Long [] pids, String type,boolean isKeyProject) throws BusinessException {
         StringBuffer sb = new StringBuffer(" select count(*) from ");
         sb.append(" (select DISTINCT t.* from task_summary t ")
-                .append(" left join task_process_summary tps on t.id = tps.task_id and is_published = 1 ");
+                .append(" left join task_process_summary tps on t.id = tps.task_id and tps.is_published = 1 and tps"
+                        + ".is_deleted = 0 ");
         if(isKeyProject){
             sb.append(" left join task_type tt ON CAST (t.tasktype_id AS int8) = tt.id ");
         }

+ 56 - 11
tc-service/tap-task/src/main/java/com/minto/app/task/manager/TaskManagerImpl.java

@@ -1140,8 +1140,12 @@ public class TaskManagerImpl implements ITaskManager {
 						List<TaskMemberBean> list = mems.stream().filter(e -> Integer.valueOf(
 								TaskMemberRelTypeEnum.Supervise.getKey()).equals(e.getRelationType())).toList();
 						setPids.addAll(getMemberPersonIds(list));
-						//todo 领导秘书收到领导批示消息
-					}else{
+						//领导秘书收到领导批示消息
+						List<Long> secretaryPersonIds = findSecretaryPersonIds(null, List.of(process.getPersonId()));
+						if(CollectionUtil.isNotEmpty(secretaryPersonIds)){
+							setPids.addAll(secretaryPersonIds);
+						}
+					} else{
 						setPids.addAll(getMemberPersonIds(mems));
 					}
 					pids = new ArrayList<Long>();
@@ -1228,6 +1232,28 @@ public class TaskManagerImpl implements ITaskManager {
 		}
 	}
 
+	/**
+	 * 获取某人的秘书
+	 *
+	 * @param cid
+	 * @param pids
+	 * @return
+	 */
+	private List<Long> findSecretaryPersonIds(Long cid, List<Long> pids){
+		if(CollectionUtil.isEmpty(pids)){
+			return new ArrayList<>();
+		}
+		Criterion criterion =
+				pids.size() > 1 ? Restrictions.in("sourceId", pids) : Restrictions.eq("sourceId", pids.get(0));
+		criterion = Restrictions.and(criterion,
+				Restrictions.eq("targetCategory", ResourceEnum.ResourceTypeEnum.OrgPerson.getKey()));
+		criterion = Restrictions.and(criterion,
+				Restrictions.eq("relationCategory", com.minto.app.organization.OrgEnum.OrgRelationCategoryEnum.Secretary.getKey()));
+		IOrgManager orgManager = AppContext.getBean(IOrgManager.class);
+		List<OrgRelationBean> relationBeanList = orgManager.findOrgRelation(criterion, cid);
+		return relationBeanList.stream().map(OrgRelationBean::getTargetId).toList();
+	}
+
 	private Set<Long> getMemberPersonIds(List<TaskMemberBean> mems){
 		Set<Long> setPids = new HashSet<Long>();
 		// 查询扩展角色 Modifier: <Zhengyu.Hu> 2018/8/21 下午2:19 end.
@@ -1633,6 +1659,8 @@ public class TaskManagerImpl implements ITaskManager {
 			theActionTypes.add(BehSummaryBehTypeEnum.ViewTask.getKey());
 		} else if (Objects.equals(pType, "InstructionsAndLevmsg")) {
 			theActionTypes.add(BehSummaryBehTypeEnum.LevMsgTask.getKey());
+		} else if (Objects.equals(pType, "LevMsgTaskWithDraw")) {
+			theActionTypes.add(BehSummaryBehTypeEnum.LevMsgTaskWithDraw.getKey());
 		} else {
 			// 全部
 			theActionTypes.add(BehSummaryBehTypeEnum.LevMsgTask.getKey());
@@ -1716,7 +1744,9 @@ public class TaskManagerImpl implements ITaskManager {
 				Map<Long, Integer> idsMap = new HashMap<Long, Integer>();
 				for (int i = 0; i < result.getList().size(); i++) {
 					BehSummaryBean beh = (BehSummaryBean) result.getList().get(i);
-					if (beh.getBehType().intValue() == BehSummaryBehTypeEnum.LevMsgTask.getKey()||beh.getBehType().intValue() == BehSummaryBehTypeEnum.InstructionsTaskLimitScope.getKey()) {
+					if(beh.getBehType() == BehSummaryBehTypeEnum.LevMsgTask.getKey()
+							|| beh.getBehType() == BehSummaryBehTypeEnum.InstructionsTaskLimitScope.getKey()
+							|| beh.getBehType() == BehSummaryBehTypeEnum.LevMsgTaskWithDraw.getKey()){
 						idsMap.put(Long.valueOf(beh.getExt1()), i);
 					}
 				}
@@ -8999,6 +9029,7 @@ public class TaskManagerImpl implements ITaskManager {
 			Criterion c = Restrictions.and(Restrictions.eq("taskId", taskId), Restrictions.eq("personId", pid));
 			c = Restrictions.and(c, Restrictions.eq("parentId", 0L));
 			c = Restrictions.and(c, Restrictions.eq("isPublished", 1));
+			c = Restrictions.and(c, Restrictions.eq("isDeleted", 0));
 			List<TaskProcessSummaryBean> processSummaryBeans = taskProcessSummaryDao.findTaskProcessBeans(c);
 			if (CollectionUtil.isNotEmpty(processSummaryBeans)) {
 				processSummaryBean = processSummaryBeans.get(0);
@@ -9021,6 +9052,7 @@ public class TaskManagerImpl implements ITaskManager {
 
 			c = Restrictions.and(c, Restrictions.eq("processResourceId", reportId));
 			c = Restrictions.and(c, Restrictions.eq("isPublished", 1));
+			c = Restrictions.and(c, Restrictions.eq("isDeleted", 0));
 
 			List<TaskProcessSummaryBean> processSummaryBeans = taskProcessSummaryDao.findTaskProcessBeans(c);
 			if (CollectionUtil.isNotEmpty(processSummaryBeans)) {
@@ -9046,6 +9078,7 @@ public class TaskManagerImpl implements ITaskManager {
 			}
 			c = Restrictions.and(c, Restrictions.eq("processStageId", phaseId));
 			c = Restrictions.and(c, Restrictions.eq("isPublished", 1));
+			c = Restrictions.and(c, Restrictions.eq("isDeleted", 0));
 
 			List<TaskProcessSummaryBean> processSummaryBeans = taskProcessSummaryDao.findTaskProcessBeans(c);
 			if (CollectionUtil.isNotEmpty(processSummaryBeans)) {
@@ -9064,6 +9097,7 @@ public class TaskManagerImpl implements ITaskManager {
 			TaskProcessSummaryBean processSummaryBean = null;
 			Criterion c =  Restrictions.and( Restrictions.eq("processResourceId", reportId));
 			c = Restrictions.and(c, Restrictions.eq("isPublished", 1));
+			c = Restrictions.and(c, Restrictions.eq("isDeleted", 0));
 
 			List<TaskProcessSummaryBean> processSummaryBeans = taskProcessSummaryDao.findTaskProcessBeans(c);
 			if (CollectionUtil.isNotEmpty(processSummaryBeans)) {
@@ -9081,6 +9115,7 @@ public class TaskManagerImpl implements ITaskManager {
 			TaskProcessSummaryBean processSummaryBean = null;
 			Criterion c =  Restrictions.and( Restrictions.eq("processResourceId", reportId));
 			c = Restrictions.and(c, Restrictions.eq("isPublished", 1));
+			c = Restrictions.and(c, Restrictions.eq("isDeleted", 0));
 			if(phaseId != null){
 				c = Restrictions.and(c,Restrictions.eq("processStageId",phaseId));
 			}
@@ -9099,6 +9134,7 @@ public class TaskManagerImpl implements ITaskManager {
 			TaskProcessSummaryBean processSummaryBean = null;
 			Criterion c =  Restrictions.and( Restrictions.eq("processResourceId", reportId));
 			c = Restrictions.and(c, Restrictions.eq("isPublished", 1));
+			c = Restrictions.and(c, Restrictions.eq("isDeleted", 0));
 			if(phaseId != null){
 				c = Restrictions.and(c,Restrictions.eq("processStageId",phaseId));
 			}
@@ -20651,7 +20687,7 @@ public class TaskManagerImpl implements ITaskManager {
 	}
 
 	@Override
-	public void deleteTaskProcess(Long itemId, Long pid) throws Exception{
+	public void updateTaskProcessWithdraw(Long itemId, Long pid) throws Exception{
 		//移除附件
 		TaskProcessSummaryBean process = taskProcessSummaryDao.findTaskProcessById(itemId);
 		if(process == null){
@@ -20663,16 +20699,24 @@ public class TaskManagerImpl implements ITaskManager {
 		if(!pid.equals(process.getPersonId())){
 			throw new IllegalAccessException("不是批示/留言的发布者不能撤回!");
 		}
-		if(new Date().compareTo(instance.getTime())>0){
+		if((!AppContext.getCurrentUser().hasRole("ShujQuzhang", "QuLingDao"))
+				&& new Date().compareTo(instance.getTime()) > 0){
 			throw new IllegalAccessException("已发布超过30分钟不能撤回!");
 		}
 		//移除附件
-		attachmentManager.deleteByReference(process.getTaskId(),itemId);
-		//移除行为
-		behManager.deleteByResTypeAndExt1(ResourceTypeEnum.Task.getKey(),String.valueOf(process.getTaskId()),
-				String.valueOf(itemId));
-		//移除批示留言
-		taskProcessSummaryDao.delete(TaskProcessSummaryBean.class,itemId);
+		//attachmentManager.deleteByReference(process.getTaskId(),itemId);
+		//修改批示留言行为
+		List<BehSummaryBean> byResTypeAndExt1 = behManager.findByResTypeAndExt1(ResourceTypeEnum.Task.getKey(),
+				String.valueOf(process.getTaskId()), String.valueOf(itemId));
+		if(CollectionUtil.isNotEmpty(byResTypeAndExt1)){
+			byResTypeAndExt1.forEach(e->{
+				e.setBehType(BehSummaryBehTypeEnum.LevMsgTaskWithDraw.getKey());
+				e.setbState(1);
+				behManager.saveOrUpdateBehSummary(e);
+			});
+		}
+		//逻辑删除批示留言
+		taskProcessSummaryDao.deleteByLogic(itemId);
 	}
 
 	@Override
@@ -20828,6 +20872,7 @@ public class TaskManagerImpl implements ITaskManager {
 		Criterion c = Restrictions.and(Restrictions.eq("taskId", taskId),
 				Restrictions.eq("ptype", TaskProcessTypeEnum.Instructions.getKey()),
 				Restrictions.eq("isPublished", BaseEnum.BooleanEnum.True.getKey()),
+				Restrictions.eq("isDeleted", BaseEnum.BooleanEnum.False.getKey()),
 				Restrictions.eq("visibilityScope", TaskProcessVisibilityScopeEnum.All.getKey()));
 		List<TaskProcessSummaryBean> taskProcessSummaryBeans = taskProcessSummaryDao.findBy(
 				TaskProcessSummaryBean.class, c);

+ 6 - 0
tc-service/tap-task/src/main/java/com/minto/app/task/mapper/ITaskAnalysisMapper.xml

@@ -177,6 +177,7 @@
         left join task_process_summary ps on rm.task_process_summary_id = ps.id
         where ps.id is not null
         and ps.is_published = 1
+        and ps.is_deleted = 0
         <if test=" param!=null and param.year!=null and param.year!='' ">
             and to_char(ps.process_date,'yyyy') = #{param.year}
         </if>
@@ -538,6 +539,7 @@
         WHERE
         tmember.task_id = tsummary.id
         and s.is_published = 1
+        and s.is_deleted = 0
         and resource_id = remidnM.department_id
         AND remidnM.task_id = tsummary.id
         AND tsummary.tstate IN (1, 2, 3, 8, 9, 11, 16, 22)
@@ -1583,6 +1585,7 @@ AND source_category = 10000002
         <if test="type == 4">
             and s.task_id = t.id
             AND s.is_published = 1
+            AND s.is_deleted = 0
             AND s.id = me.task_process_summary_id
         </if>
     </select>
@@ -1732,6 +1735,7 @@ AND source_category = 10000002
         <if test="type == 4">
             and s.task_id = t.id
             AND s.is_published = 1
+            AND s.is_deleted = 0
             AND s.id = me.task_process_summary_id
             AND T .tstate != 0
             and me.department_id=#{pid}
@@ -4666,6 +4670,7 @@ AND receiver_id in(#{sid}, #{rid})
         AND p.can_count = 1
         AND s.task_id = t.id
         AND s.is_published = 1
+        AND s.is_deleted = 0
         AND s.id = me.task_process_summary_id
         )as tasksummary
         WHERE tasksummary.id = #{taskId}
@@ -4781,6 +4786,7 @@ AND receiver_id in(#{sid}, #{rid})
         AND p.can_count = 1
         AND s.task_id = t.id
         AND s.is_published = 1
+        AND s.is_deleted = 0
         AND s.id = me.task_process_summary_id
         AND CAST(p.id as VARCHAR(20)) = t.tasktype_id
         AND T .tstate IN(1,2, 3, 8, 9, 11,16,22)

+ 5 - 3
tc-service/tap-task/src/main/java/com/minto/app/task/mapper/ITaskSummaryMapper.xml

@@ -304,7 +304,7 @@
 
 	<!-- 获取领导批示统计 -->
 	<select id="getInstructionsCount" resultType="Map">
-		select count(*) as "count",task_id from task_process_summary where ptype = 16 and is_published = 1
+		select count(*) as "count",task_id from task_process_summary where ptype = 16 and is_published = 1 and is_deleted = 0
 		<if test="taskId != null">
 			and task_id = #{taskId}
 		</if>
@@ -316,7 +316,7 @@
 
 	<!-- 查询领导留言和普通留言,好像有点瓜,group by ptype有点问题 -->
 	<select id="findInstructionsAndLeavingaMessageCount" resultType="Map">
-		select task_id,ptype,count(*) as "count" from task_process_summary where ptype in (16,0,3)
+		select task_id,ptype,count(*) as "count" from task_process_summary where ptype in (16,0,3) and is_deleted = 0
 		<if test="taskId != null">
 			and task_id = #{taskId}
 		</if>
@@ -336,7 +336,7 @@
 
 
 	<select id="findLeavingaMessageCount" resultType="Map">
-		select count(*) as "count",task_id from task_process_summary where ptype = 0 AND is_published = 1
+		select count(*) as "count",task_id from task_process_summary where ptype = 0 and is_published = 1 and is_deleted = 0
 		<if test="taskId != null">
 			and task_id = #{taskId}
 		</if>
@@ -1326,6 +1326,7 @@
         AND tps.ptype = 16
         AND tps.task_id = t.id
 		AND tps.is_published = 1
+		AND tps.is_deleted = 0
 		AND t.id = M.task_id
         ORDER BY tps.process_date desc
     </select>
@@ -1696,6 +1697,7 @@
 				WHERE
 				s.tstate NOT IN (0, 7)
 				AND tps.is_published = 1
+				AND tps.is_deleted = 0
 				AND td.type_Of_Buckle='50001001'
 				and t.can_count=1
 				AND to_char(s.create_date, 'yyyy') = #{param.year}

+ 5 - 3
tc-service/tap-workbrain/src/main/java/com/minto/app/workbrain/chat.sql.xml

@@ -15,11 +15,12 @@
             from task_summary a
                      left join task_process_summary b on a.id = b.task_id
                      left join task_member c on a.id = c.task_id
-            where (b.task_id, process_date) in (select task_id, max(process_date) from task_process_summary where is_published = 1 group by task_id)
+            where (b.task_id, process_date) in (select task_id, max(process_date) from task_process_summary where is_published = 1 and is_deleted = 0 group by task_id)
                #[ and a.title like :title]
               and c.resource_id = :resourceid
               and a.tstate in (1,2)
               and b.is_published = 1
+              and b.is_deleted = 0
             union
             select distinct a.id,a.title
             from task_summary a
@@ -67,10 +68,11 @@
             from task_summary a
                      left join task_process_summary b on a.id = b.task_id
                      left join org_person p on b.person_id = p.id
-            where (b.task_id, process_date) in (select task_id, max(process_date) from task_process_summary where is_published = 1 group by task_id)
+            where (b.task_id, process_date) in (select task_id, max(process_date) from task_process_summary where is_published = 1 and is_deleted = 0 group by task_id)
               and a.id = :id
               and a.tstate in (1,2)
-              AND b.is_published = 1
+              and b.is_published = 1
+              and b.is_deleted = 0
             union all
             select distinct a.id, a.title, b.create_date, b.create_by,b.process_detail,p.pname,1 as type
             from task_summary a

+ 1 - 0
tip-api/src/main/java/com/minto/app/behavior/enums/BehaviorEnum.java

@@ -227,6 +227,7 @@ public final class BehaviorEnum {
         TaskAutoComplete(10002052, "behavior.auto.complete.task", "behavior.auto.complete.task.desc",BehSummaryBehCategoryEnum.Biz,"单位办结事项,包含必须的行为参数:belongTo:修改人的id,res:事项资源,类型为枚举ResourceTypeEnum.Task ,id为当前事项的id , ext1:不启用 , ext2:不启用, ext3:不启用"),
         /** 留言 */
         LevMsgTask(10002004, "behavior.leavmessage.task", "behavior.leavmessage.task.desc",BehSummaryBehCategoryEnum.Biz,"保存事项留言,包含必须的行为参数:belongTo:留言人的id,res:事项资源,类型为枚举ResourceTypeEnum.Task ,id为当前事项的id , ext1:留言的id , ext2:与操作相关的人或单位id, ext3:TaskSummaryTcategoryEnum"),
+        LevMsgTaskWithDraw(10002026, "behavior.leavmessage.task", "behavior.leavmessage.task.desc", BehSummaryBehCategoryEnum.Biz,"批示留言数据的撤回动作:belongTo:批示人的id,res:事项资源,类型为枚举ResourceTypeEnum.Task ,id为当前事项的id , ext1:批示的id , ext2:与操作相关的人或单位id, ext3:TaskSummaryTcategoryEnum"),
         /** 意见回复 */
         SendMsgTask(10002005, "behavior.sendmsg.task", "behavior.sendmsg.task.desc",BehSummaryBehCategoryEnum.Biz,"保存事项留言回复,包含必须的行为参数:belongTo:留言人的id,res:事项资源,类型为枚举ResourceTypeEnum.Task ,id为当前事项的id , ext1:留言id , ext2:与操作相关的人或单位id, ext3:TaskSummaryTcategoryEnum"),
         /** 调整成员 */

+ 1 - 1
tip-api/src/main/java/com/minto/app/behavior/manager/IBehManager.java

@@ -596,7 +596,7 @@ public interface IBehManager {
      */
     List<Map<String, Object>> findBehaviorByBehType(int behType, List<Long> ids);
 
-    void deleteByResTypeAndExt1(Integer resType, String resId, String ext1);
+    List<BehSummaryBean> findByResTypeAndExt1(Integer resType, String resId, String ext1);
 
     List<BehSummaryBean> findByBehTypeAndResId(Integer behType,Integer resType, String resId);
 }

+ 14 - 0
tip-api/src/main/java/com/minto/app/task/beans/TaskProcessSummaryBean.java

@@ -60,6 +60,12 @@ public class TaskProcessSummaryBean extends BasePO {
 
     private Long processStageId;
 
+    /**
+     * 批示留言是否已发布,默认否
+     * @see BaseEnum.BooleanEnum
+     */
+    private Integer isDeleted = BaseEnum.BooleanEnum.False.getKey();
+
     /**
      * 批示留言是否已发布,默认是
      * @see BaseEnum.BooleanEnum
@@ -230,6 +236,14 @@ public class TaskProcessSummaryBean extends BasePO {
         this.processStageId = processStageId;
     }
 
+    public Integer getIsDeleted(){
+        return isDeleted;
+    }
+
+    public void setIsDeleted(Integer isDeleted){
+        this.isDeleted = isDeleted;
+    }
+
     public Integer getIsPublished(){
         return isPublished;
     }

+ 1 - 1
tip-api/src/main/java/com/minto/app/task/manager/ITaskManager.java

@@ -4659,7 +4659,7 @@ public interface ITaskManager {
      * @param itemId
      * @param pid
      */
-    void deleteTaskProcess(Long itemId,Long pid) throws Exception;
+    void updateTaskProcessWithdraw(Long itemId,Long pid) throws Exception;
 
     /**
      * 传阅任务

+ 43 - 27
tip-api/src/main/java/com/minto/app/task/util/TaskTransverter.java

@@ -5,34 +5,35 @@
 
 package com.minto.app.task.util;
 
+import java.text.DecimalFormat;
+import java.text.ParseException;
+import java.util.*;
+import java.util.stream.Collectors;
+
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
 import com.minto.app.behavior.beans.BehSummaryBean;
 import com.minto.app.behavior.enums.BehaviorEnum;
 import com.minto.app.behavior.enums.BehaviorEnum.BehSummaryBehTypeEnum;
 import com.minto.app.behavior.manager.IBehManager;
+import com.minto.app.collaboration.beans.ColSummaryBean;
+import com.minto.app.content.beans.CommonContentBean;
+import com.minto.app.content.manager.IContentManager;
 import com.minto.app.organization.OrgEnum;
-import com.minto.app.organization.beans.OrgUnitBean;
 import com.minto.app.organization.beans.OrgEntity;
 import com.minto.app.organization.beans.OrgPersonBean;
 import com.minto.app.organization.beans.OrgRelationBean;
+import com.minto.app.organization.beans.OrgUnitBean;
 import com.minto.app.organization.manager.IOrgManager;
-import com.minto.app.resource.bo.CommonResourceRelationBO;
 import com.minto.app.resource.beans.CommonResourceRelationBean;
+import com.minto.app.resource.bo.CommonResourceRelationBO;
 import com.minto.app.resource.enums.ResourceEnum;
 import com.minto.app.resource.enums.ResourceEnum.ResourceTypeEnum;
 import com.minto.app.resource.manager.IResourceManager;
-import com.minto.app.collaboration.beans.ColSummaryBean;
-import com.minto.app.space.enums.SpaceFileType;
-import com.minto.app.task.beans.*;
-import com.minto.app.content.beans.CommonContentBean;
-import com.minto.app.content.manager.IContentManager;
-import com.minto.app.task.enums.TaskProcessVisibilityScopeEnum;
-import com.minto.app.tc.knowledge.beans.ArcSummaryBean;
-import com.minto.app.tc.knowledge.enums.KmEnum;
-import com.minto.app.tc.knowledge.manager.IKnowledgeManager;
 import com.minto.app.space.beans.SpaceFileBean;
+import com.minto.app.space.enums.SpaceFileType;
 import com.minto.app.space.manager.ISpaceManager;
+import com.minto.app.task.beans.*;
 import com.minto.app.task.bo.TaskBO;
 import com.minto.app.task.bo.TaskPostscriptBO;
 import com.minto.app.task.bo.TaskProcessBO;
@@ -40,30 +41,26 @@ import com.minto.app.task.bo.TaskReportBO;
 import com.minto.app.task.enums.CategoryEnum;
 import com.minto.app.task.enums.TaskEnum;
 import com.minto.app.task.enums.TaskEnum.*;
+import com.minto.app.task.enums.TaskProcessVisibilityScopeEnum;
 import com.minto.app.task.manager.ITaskAppManager;
 import com.minto.app.task.manager.ITaskByTypeManager;
 import com.minto.app.task.manager.ITaskInfoManager;
 import com.minto.app.task.manager.ITaskManager;
+import com.minto.app.tc.knowledge.beans.ArcSummaryBean;
+import com.minto.app.tc.knowledge.enums.KmEnum;
+import com.minto.app.tc.knowledge.manager.IKnowledgeManager;
 import com.minto.app.workflow.manager.IWorkflowManager;
 import com.minto.core.base.ListObject;
+import com.minto.core.util.*;
 import com.minto.tap.collaboration.api.CollaborationApi;
 import com.minto.tip.common.exceptions.BusinessException;
-import com.minto.core.util.*;
-import com.minto.app.task.beans.TaskAttrBean;
 import com.minto.tip.common.util.ApplicationContextHolder;
 import org.apache.commons.lang3.StringUtils;
-import org.hibernate.criterion.DetachedCriteria;
-import org.hibernate.criterion.Restrictions;
 import org.jsoup.Jsoup;
 import org.jsoup.nodes.Document;
 import org.jsoup.select.Elements;
 import org.springframework.util.CollectionUtils;
 
-import java.text.DecimalFormat;
-import java.text.ParseException;
-import java.util.*;
-import java.util.stream.Collectors;
-
 public class TaskTransverter{
 
     /**
@@ -744,14 +741,22 @@ public class TaskTransverter{
     private static class ItemTranslation extends SimpleObjectEncoder.Translation {
         private Long personId;
 
-        public ItemTranslation(Long personId) {
+        private boolean kaizhouLingDao;
+
+        public ItemTranslation(Long personId, boolean kaizhouLingDao) {
             this.personId = personId;
+            this.kaizhouLingDao = kaizhouLingDao;
         }
 
         public Long getPersonId() {
             return personId;
         }
 
+
+        public boolean isKaizhouLingDao(){
+            return kaizhouLingDao;
+        }
+
         public ItemTranslation() {
         }
 
@@ -970,7 +975,13 @@ public class TaskTransverter{
                     Calendar instance = Calendar.getInstance();
                     instance.add(Calendar.MINUTE, -30);
                     //时间小于三十分钟,批示留言可撤回
-                    resultObj.put("lessThanHalfAnHour",tprocss.getProcessDate()!=null && DateUtil.compare_date(instance.getTime(),tprocss.getProcessDate()) < 0);
+                    if(isKaizhouLingDao()){
+                        //开州区长书记、区领导撤回不会受到时间限制
+                        resultObj.put("lessThanHalfAnHour", true);
+                    } else{
+                        resultObj.put("lessThanHalfAnHour", tprocss.getProcessDate() != null
+                                && DateUtil.compare_date(instance.getTime(), tprocss.getProcessDate()) < 0);
+                    }
                     //可见范围
                     if(tprocss.getPtype() != null && TaskProcessTypeEnum.Instructions.getKey() == tprocss.getPtype()){
                         List<Long> kaizhoLingDaoIds = TaskMemberAgentUtil.getAccountPersonByRoleCodes(
@@ -1004,9 +1015,6 @@ public class TaskTransverter{
             return fileBeans;
         }
     }
-
-
-
     /**
      * 任务动态列表转换器
      *
@@ -1015,11 +1023,19 @@ public class TaskTransverter{
      * @throws BusinessException
      */
     public static List<?> createProcessVO(List<TaskProcessBO> processBOs, Long personId) throws BusinessException {
-        return (List<?>) DataUtil.objectToSimpleObject(processBOs, new ItemTranslation(personId));
+        return createProcessVO(processBOs, personId,false);
+    }
+
+    public static List<?> createProcessVO(List<TaskProcessBO> processBOs, Long personId, boolean isKaizhouLingDao) throws BusinessException {
+        return (List<?>) DataUtil.objectToSimpleObject(processBOs, new ItemTranslation(personId,isKaizhouLingDao));
     }
 
     public static Map<String,Object> createProcessVO(TaskProcessBO processBO, Long personId) throws BusinessException {
-        return (Map<String,Object>) DataUtil.objectToSimpleObject(processBO, new ItemTranslation(personId));
+        return createProcessVO(processBO, personId,false);
+    }
+
+    public static Map<String,Object> createProcessVO(TaskProcessBO processBO, Long personId, boolean isKaizhouLingDao) throws BusinessException {
+        return (Map<String,Object>) DataUtil.objectToSimpleObject(processBO, new ItemTranslation(personId, isKaizhouLingDao));
     }
 
     /**

+ 14 - 8
tip-bff/src/main/java/com/minto/bff/beh.sql.xml

@@ -9,8 +9,10 @@
         num
         FROM
         (
-        WITH RECURSIVE ss AS ( SELECT * FROM task_process_summary A WHERE A.ID = :ids AND A.is_published = 1
-        UNION ALL SELECT b.* FROM task_process_summary b, ss WHERE b.parent_id = ss.ID AND b.is_published = 1) SELECT
+        WITH RECURSIVE ss AS ( SELECT * FROM task_process_summary A WHERE A.ID = :ids AND A.is_published = 1 AND
+        A.is_deleted = 0
+        UNION ALL SELECT b.* FROM task_process_summary b, ss WHERE b.parent_id = ss.ID AND b.is_published = 1 AND
+        b.is_deleted = 0) SELECT
         task_id,
         COUNT ( ID ) NUM
         FROM
@@ -30,8 +32,9 @@
         FROM
         (
         WITH ss(id,task_id) AS ( SELECT a.id,a.task_id FROM task_process_summary A WHERE A.ID = :ids AND
-        A.is_published = 1
-        UNION ALL SELECT b.id,b.task_id FROM task_process_summary b, ss WHERE b.parent_id = ss.ID AND b.is_published = 1) SELECT
+        A.is_published = 1 AND A.is_deleted = 0
+        UNION ALL SELECT b.id,b.task_id FROM task_process_summary b, ss WHERE b.parent_id = ss.ID AND b.is_published
+        = 1 AND b.is_deleted = 0) SELECT
         task_id,
         COUNT ( ID ) NUM
         FROM
@@ -45,8 +48,10 @@
     </sql>
 
     <sql id="findTaskLevMsg">
-        WITH RECURSIVE ss AS ( SELECT * FROM task_process_summary A WHERE A.ID = :id AND A.is_published = 1
-        UNION ALL SELECT b.* FROM task_process_summary b, ss WHERE b.parent_id = ss.ID AND b.is_published = 1)
+        WITH RECURSIVE ss AS ( SELECT * FROM task_process_summary A WHERE A.ID = :id AND A.is_published = 1 AND
+        A.is_deleted = 0
+        UNION ALL SELECT b.* FROM task_process_summary b, ss WHERE b.parent_id = ss.ID AND b.is_published = 1 AND
+        b.is_deleted = 0)
         SELECT
         *
         FROM
@@ -54,8 +59,9 @@
     </sql>
 
     <sql id="findTaskLevMsg_dm">
-        WITH ss AS ( SELECT * FROM task_process_summary A WHERE A.ID = :id AND A.is_published = 1
-        UNION ALL SELECT b.* FROM task_process_summary b, ss WHERE b.parent_id = ss.ID AND b.is_published = 1)
+        WITH ss AS ( SELECT * FROM task_process_summary A WHERE A.ID = :id AND A.is_published = 1 AND A.is_deleted = 0
+        UNION ALL SELECT b.* FROM task_process_summary b, ss WHERE b.parent_id = ss.ID AND b.is_published = 1 AND
+        b.is_deleted = 0)
         SELECT
         *
         FROM

+ 2 - 1
tip-front/src/main/java/com/minto/app/task/controller/MtTaskController.java

@@ -5540,7 +5540,8 @@ public class MtTaskController extends BaseController {
 			count = result.getCount();
 			List processBOs = result.getList();
 			// 转换数据
-			List<?> list2 = TaskTransverter.createProcessVO(processBOs, personId);
+			boolean isKaizhouLingDao = TaskKaizhouUtil.isShujiQuZhangQuLingDao();
+			List<?> list2 = TaskTransverter.createProcessVO(processBOs, personId, isKaizhouLingDao);
 			final TaskSummaryBean summaryBean = taskManager.findTaskSummaryBeanById(taskId);
 			List<TaskMemberBean> memberBeans = taskManager.findTaskMembersByTaskId(summaryBean.getId());
 			List<TaskMemberBean> currentMemberBeans = TaskMemberUtil.getMemberBeansByPid(memberBeans,personId);

+ 16 - 15
tip-front/src/main/java/com/minto/app/task/controller/TaskByTypeController.java

@@ -8076,13 +8076,14 @@ public class TaskByTypeController extends BaseController{
 
                     //督办人员可以设置区长书记、区领导批示留言公开范围
                     model.put("isSupervise", TaskKaizhouUtil.isSupervise(taskMemberBeans, pid));
-                    Object[] objectArray = TaskKaizhouUtil.findShowKaiZhouLeaderPiShiBehSummarys(taskId,
-                            taskMemberBeans, currentMemberBeans, pid);
-                    List<BehSummaryBean> showList = (List<BehSummaryBean>)objectArray[0];
-                    List<BehSummaryBean> notShowList = (List<BehSummaryBean>)objectArray[1];
-                    AppContext.putThreadContext("showInstructionsTaskLimitScope", true);
-                    AppContext.putThreadContext("instructionsTaskLimitScopeShowIds",showList.stream().map(BehSummaryBean::getId).toList());
-
+                    if(!"LevMsgTaskWithDraw".equals(pType)){
+                        Object[] objectArray = TaskKaizhouUtil.findShowKaiZhouLeaderPiShiBehSummarys(taskId,
+                                taskMemberBeans, currentMemberBeans, pid);
+                        List<BehSummaryBean> showList = (List<BehSummaryBean>)objectArray[0];
+                        List<BehSummaryBean> notShowList = (List<BehSummaryBean>)objectArray[1];
+                        AppContext.putThreadContext("showInstructionsTaskLimitScope", true);
+                        AppContext.putThreadContext("instructionsTaskLimitScopeShowIds",showList.stream().map(BehSummaryBean::getId).toList());
+                    }
                     // 查询动态
                     ListObject result = null;
                     ListObject managerResult = null;
@@ -8159,9 +8160,9 @@ public class TaskByTypeController extends BaseController{
 
                     List<?> list2 = null;
 
-
+                    boolean isKaizhouLingDao = TaskKaizhouUtil.isShujiQuZhangQuLingDao();
                     if(pType.equals(TaskEnum.TaskProcessTypeEnum.Instructions.name())) { // 批示条数的列表
-                        list2 = TaskTransverter.createProcessVO(instructionsList, pid);     //以前的  点开数据不对
+                        list2 = TaskTransverter.createProcessVO(instructionsList, pid, isKaizhouLingDao);     //以前的  点开数据不对
                         if(list2.size()==0){
                             List<TaskProcessBO> instructionsList1=Lists.newArrayList();
                             List pData = managerResult.getList();
@@ -8171,7 +8172,7 @@ public class TaskByTypeController extends BaseController{
                                     instructionsList1.add(processBO);
                                 }
                             }
-                            list2 = TaskTransverter.createProcessVO(instructionsList1, pid);//改了之后
+                            list2 = TaskTransverter.createProcessVO(instructionsList1, pid, isKaizhouLingDao);//改了之后
                         }
 
                     } else if(pType.equals(TaskEnum.TaskProcessTypeEnum.CommonOpinion.name())) { // 查看次数的列表
@@ -8198,12 +8199,12 @@ public class TaskByTypeController extends BaseController{
 
                                 viewTaskVosProcessBO.add(bo);
                             }
-                            list2 = TaskTransverter.createProcessVO(viewTaskVosProcessBO, pid);
+                            list2 = TaskTransverter.createProcessVO(viewTaskVosProcessBO, pid, isKaizhouLingDao);
                         }
 
                         /* InstructionsAndLevmsg:批示留言都要查,没有弄成枚举  edited by lijun at 2020/3/18 11:44 */
-                    } else if ("InstructionsAndLevmsg".equals(pType)) {
-                        list2 = TaskTransverter.createProcessVO(instructionsAndMsgList, pid);     //以前的  点开数据不对
+                    } else if(StringUtils.equalsAny(pType, "InstructionsAndLevmsg", "LevMsgTaskWithDraw")){
+                        list2 = TaskTransverter.createProcessVO(instructionsAndMsgList, pid, isKaizhouLingDao);     //以前的  点开数据不对
                         if (list2.size() == 0) {
                             List<TaskProcessBO> instructionsList1 = Lists.newArrayList();
                             if(managerResult != null){
@@ -8215,7 +8216,7 @@ public class TaskByTypeController extends BaseController{
                                     }
                                 }
                             }
-                            list2 = TaskTransverter.createProcessVO(instructionsList1, pid);//改了之后
+                            list2 = TaskTransverter.createProcessVO(instructionsList1, pid, isKaizhouLingDao);//改了之后
                         }
                     } else {
                         list2 = Lists.newArrayList();
@@ -8246,7 +8247,7 @@ public class TaskByTypeController extends BaseController{
                                 processBOS.add(bo);
                             }
                         }
-                        list2 = TaskTransverter.createProcessVO(processBOS, pid); // 留言全部条数
+                        list2 = TaskTransverter.createProcessVO(processBOS, pid, isKaizhouLingDao); // 留言全部条数
                     }
 
                     model.put("list", list2);

+ 4 - 3
tip-front/src/main/java/com/minto/app/task/controller/TaskController.java

@@ -1029,7 +1029,8 @@ public class TaskController extends BaseController {
             count = result.getCount();
             List processBOs = result.getList();
             // 转换数据
-            List<?> list2 = TaskTransverter.createProcessVO(processBOs, personId);
+            boolean isKaizhouLingDao = TaskKaizhouUtil.isShujiQuZhangQuLingDao();
+            List<?> list2 = TaskTransverter.createProcessVO(processBOs, personId, isKaizhouLingDao);
             final TaskBO taskBO = taskManager.findTaskBOById(taskId);
             TaskSummaryBean summaryBean = taskBO.getSummaryBean();
             List<TaskMemberBean> currentMemberBeans = taskBO.getMemberBeansByPid(personId);
@@ -1295,7 +1296,7 @@ public class TaskController extends BaseController {
         try{
             Long itemId = ReqUtil.getLong(request, "itemId");
             Long pid = AppContext.getCurrentUser().getId();
-            taskManager.deleteTaskProcess(itemId, pid);
+            taskManager.updateTaskProcessWithdraw(itemId, pid);
             result.put("state", "success");
         } catch(Exception e){
             result.put("state", "error");
@@ -3702,7 +3703,7 @@ public class TaskController extends BaseController {
                 }
             }
             //如果是领导批示,则向他的秘书发送消息
-            if(flag && TaskKaizhouUtil.isShujiQuZhangQuLingDao()){
+            if(flag && isKaizhouLeader){
                 String content = AppContext.currentUserName() + "批示了<" + summ.getTitle() + ">:" + opinion;
                 TaskKaizhouUtil.sendMessageToClerk(id, content);
             }

+ 56 - 3
tip-front/src/main/java/com/minto/app/task/util/TaskKaizhouUtil.java

@@ -31,6 +31,8 @@ import com.minto.tip.common.exceptions.BusinessException;
 import com.minto.tip.common.util.ApplicationContextHolder;
 import com.minto.tip.organization.enums.RelationValueName;
 import org.apache.commons.lang.ObjectUtils;
+import org.hibernate.criterion.Criterion;
+import org.hibernate.criterion.Restrictions;
 import org.jbpm.JbpmContext;
 import org.jbpm.taskmgmt.exe.TaskInstance;
 import org.slf4j.LoggerFactory;
@@ -114,7 +116,16 @@ public final class TaskKaizhouUtil{
                 showIds.addAll(list.stream().filter(e -> userId.equals(e.getBelongToResId())).map(BehSummaryBean::getId)
                                    .toList());
             }
-            //优先级2:根据公布范围设置可以看的区长书记、区领导发布的批示Id
+            //优先级2:区长书记、区领导的秘书可以看对应领导的批示留言数据
+            List<Long> leaderPersonIdsBySecretary = TaskKaizhouUtil.findLeaderPersonIds(null, List.of(userId));
+            List<Long> leaderPersonIds = TaskKaizhouUtil.findShuJiQuZhangQuLingDaoPersonIds();
+            if(CollectionUtil.isNotEmpty(leaderPersonIdsBySecretary)){
+                List<Long> list1 = leaderPersonIdsBySecretary.stream().filter(leaderPersonIds::contains).toList();
+                showIds.addAll(
+                        list.stream().filter(e -> list1.contains(e.getBelongToResId())).map(BehSummaryBean::getId)
+                            .toList());
+            }
+            //优先级3:根据公布范围设置可以看的区长书记、区领导发布的批示Id
             ITaskManager taskManager = AppContext.getBean(ITaskManager.class);
             List<Long> processIds = taskManager.findTaskProcessVisibilityRunTime(taskId, userId);
             if(CollectionUtil.isNotEmpty(processIds)){
@@ -122,9 +133,8 @@ public final class TaskKaizhouUtil{
                 showIds.addAll(
                         list.stream().filter(e -> ext1Strs.contains(e.getExt1())).map(BehSummaryBean::getId).toList());
             }
-            //优先级3:流程参与人员不能看区长书记、区领导批示留言数据
+            //优先级4:流程参与人员不能看区长书记、区领导批示留言数据
             if(TaskKaizhouUtil.isNodeManager(taskMemberBeans, currentMemberBeans, userId)){
-                List<Long> leaderPersonIds = TaskKaizhouUtil.findShuJiQuZhangQuLingDaoPersonIds();
                 showIds.addAll(list.stream().filter(e -> !(
                                            ResourceEnum.ResourceTypeEnum.OrgPerson.getKey() == e.getBelongToResType()
                                                    && leaderPersonIds.contains(e.getBelongToResId()))).map(BehSummaryBean::getId)
@@ -259,4 +269,47 @@ public final class TaskKaizhouUtil{
 
         return nodeBO;
     }
+    /**
+     * 获取某人的秘书
+     *
+     * @param cid
+     * @param pids
+     * @return
+     */
+    public static List<Long> findSecretaryPersonIds(Long cid, List<Long> pids){
+        if(CollectionUtil.isEmpty(pids)){
+            return new ArrayList<>();
+        }
+        Criterion criterion =
+                pids.size() > 1 ? Restrictions.in("sourceId", pids) : Restrictions.eq("sourceId", pids.get(0));
+        criterion = Restrictions.and(criterion,
+                Restrictions.eq("targetCategory", ResourceEnum.ResourceTypeEnum.OrgPerson.getKey()));
+        criterion = Restrictions.and(criterion,
+                Restrictions.eq("relationCategory", OrgEnum.OrgRelationCategoryEnum.Secretary.getKey()));
+        IOrgManager orgManager = AppContext.getBean(IOrgManager.class);
+        List<OrgRelationBean> relationBeanList = orgManager.findOrgRelation(criterion, cid);
+        return relationBeanList.stream().map(OrgRelationBean::getTargetId).toList();
+    }
+
+    /**
+     * 获取某人作为哪些领导的秘书
+     * @param cid
+     * @param pids
+     * @return
+     */
+    public static List<Long> findLeaderPersonIds(Long cid, List<Long> pids){
+        if(CollectionUtil.isEmpty(pids)){
+            return new ArrayList<>();
+        }
+        Criterion criterion =
+                pids.size() > 1 ? Restrictions.in("targetId", pids) : Restrictions.eq("targetId", pids.get(0));
+
+        criterion = Restrictions.and(criterion,
+                Restrictions.eq("targetCategory", ResourceEnum.ResourceTypeEnum.OrgPerson.getKey()));
+        criterion = Restrictions.and(criterion,
+                Restrictions.eq("relationCategory", OrgEnum.OrgRelationCategoryEnum.Secretary.getKey()));
+        IOrgManager orgManager = AppContext.getBean(IOrgManager.class);
+        List<OrgRelationBean> relationBeanList = orgManager.findOrgRelation(criterion, cid);
+        return relationBeanList.stream().map(OrgRelationBean::getSourceId).toList();
+    }
 }

+ 2 - 1
tip-front/src/main/java/com/minto/web/tc/dataserver/TcRecommendController.java

@@ -4080,7 +4080,8 @@ public class TcRecommendController {
 
                 }
             }
-            List<?> list2  = TaskTransverter.createProcessVO(instructionsAndMsgList, pid);     //以前的  点开数据不对
+            boolean isKaizhouLingDao = TaskKaizhouUtil.isShujiQuZhangQuLingDao();
+            List<?> list2  = TaskTransverter.createProcessVO(instructionsAndMsgList, pid, isKaizhouLingDao);     //以前的  点开数据不对
             result.put("list", list2);
             result.put("count", listObject.getCount());
             result.put("state", "success");

+ 22 - 8
tip-front/src/main/webapp/tc_suite/taskmt/doTaskIndex.jsp

@@ -147,10 +147,10 @@
 		.people_answer li{float: left;width: 100%;border-bottom: 1px solid #ccc;margin-top: 20px;}
 		.ranswer_answer textarea{width: 100%;height: 60px;text-indent: 5px;}
 		.approval{width: 100%;padding: 0 10px}
-		.approval ul li{width: 33.333333333%;float: left; cursor:pointer;text-align: center;}
+		.approval ul li{width: 25%;float: left; cursor:pointer;text-align: center;}
 		.approval ul li label{float: left;margin: 0px;text-align: center;width: 100%;cursor: pointer;margin-bottom: 5px;}
 		.approval ul li p{margin: 0;font-size: 14px;color: #000000;}
-		.approval ul li span{font-size: 14px;cursor: pointer;}
+		.approval ul li span{font-size: 12px;cursor: pointer;}
 		.approval ul .show span{color: #0c94ff;}
 		/* 取消在线状态显示 */
 		.state_off{background-position: -239px -330px;background: none;padding-left:0;}
@@ -1408,12 +1408,12 @@
 									<div class="mt-tab">
 										<c:choose>
 											<c:when test="${reportType}">
-																				<c:if test="${isShowApprovalOpinion}">
-																					<li class="mt-tabLi" target="opinion">
-																						<span>审批意见</span>
-																						<span class="mt-tab-line"></span>
-																					</li>
-																				</c:if>
+												<c:if test="${isShowApprovalOpinion}">
+													<li class="mt-tabLi" target="opinion">
+														<span>审批意见</span>
+														<span class="mt-tab-line"></span>
+													</li>
+												</c:if>
 												<li class="ps_class mt-tab-chosen mt-tabLi" id="ps" target="ps">
 													<span>${tc:i18n("task.comment.message")}</span>
 													<span class="mt-tab-line"></span>
@@ -1462,6 +1462,14 @@
 													<span>批示留言<span id="instructionsCount">${instructionsCount}</span>条</span>
 													<div style="clear: both"></div>
 												</li>
+												<c:if test="${isSupervisePerson}">
+													<li id="withdrawn">
+														<label><img src="${path}/tc_suite/taskmt/img/withdrawn.png" alt=""></label>
+														<p></p>
+														<span>已撤回</span>
+														<div style="clear: both"></div>
+													</li>
+												</c:if>
 												<li id="viewTask">
 													<label><img src="${path}/tc_suite/taskmt/img/ck.png" alt=""></label>
 													<p></p>
@@ -3121,6 +3129,12 @@
 
 			});
 
+			// 撤回列表
+			$("#withdrawn").click(function(){
+				var url = "${path}/taskByType/${id}/bbs/LevMsgTaskWithDraw/?hiddenPs=1";
+				$("#processFrame").attr("src",url);
+			});
+
 			//查看次数
 			$("#viewTask").click(function(){
 				var url = "${path}/taskByType/${id}/bbs/CommonOpinion/?hiddenPs=1";

BIN
tip-front/src/main/webapp/tc_suite/taskmt/img/withdrawn.png


+ 5 - 3
tip-front/src/main/webapp/tc_suite/taskmt/taskMessageList.jsp

@@ -898,8 +898,9 @@
                                             </table>
                                         </form>
                                     </span>
+
                                     <%-- 一级留言[回复]文字按钮 --%>
-                                    <c:if test="${process.itemType == 10002004 || process.itemType == 10002002 }"><!--|| (process.itemType == 10002001 && isManager )-->
+                                    <c:if test="${(process.itemType == 10002004 || process.itemType == 10002002) && pType != 'LevMsgTaskWithDraw'}"><!--|| (process.itemType == 10002001 && isManager )-->
                                         <c:if test="${process.itemId != -1}">
                                             <a style="float: right;margin: 0;" href="javascript:;" class="mt-btn-font" name="replys" ct="add${status.index }">[${tc:i18n("task.reply")}]</a><!--回复-->
                                             <%-- <c:if test="${processCount > 0 }">
@@ -908,12 +909,12 @@
                                         </c:if>
                                     </c:if>
                                     <%-- 一级留言[撤回]文字按钮 --%>
-                                    <c:if test="${process.itemType == 10002004 && process.itemId != -1 && process.pid == pid && process.lessThanHalfAnHour}">
+                                    <c:if test="${process.itemType == 10002004 && process.itemId != -1 && process.pid == pid && process.lessThanHalfAnHour && pType != 'LevMsgTaskWithDraw'}">
                                         <a href="javascript:;" name="withdraw" class="mt-btn-font" itemId="${process.itemId}"
                                            style="float: right;margin: 0;">[${tc:i18n("task.porcess.withdraw")}]</a>
                                     </c:if>
                                     <%-- 领导批示[公布范围]文字按钮 --%>
-                                    <c:if test="${process.itemType == 10002004 && process.isKaizhouLingDao && isSupervise}">
+                                    <c:if test="${process.itemType == 10002004 && process.isKaizhouLingDao && isSupervise && pType != 'LevMsgTaskWithDraw'}">
                                         <div class="mt-btn mt-btn-blue" style="float: right;margin-right:10px">
                                             <span name="visibilityScope" itemId="${process.itemId}">${process.visibilityScopeStr}</span>
                                         </div>
@@ -1002,6 +1003,7 @@
 <script type="application/javascript">
     var tempOpinion = '${tempOpinion}';
     var tempAttachment = '${tempAttachment}';
+
     $("#gdDiv").mCustomScrollbar({
         autoHideScrollbar:true,
         axis:"y"

+ 2 - 2
tip-service/tip-common/src/main/java/com/minto/app/behavior/manager/BehManagerImpl.java

@@ -1447,11 +1447,11 @@ public class BehManagerImpl extends AsynchronousBatchTask<BehSummaryBean> implem
     }
 
     @Override
-    public void deleteByResTypeAndExt1(Integer resType, String resId, String ext1){
+    public List<BehSummaryBean> findByResTypeAndExt1(Integer resType, String resId, String ext1){
         LogicalExpression c = Restrictions.and(Restrictions.eq("resType", resType),
                 Restrictions.eq("resId", resId));
         c = Restrictions.and(c,Restrictions.eq("ext1", ext1));
-        behSummaryDao.delete(BehSummaryBean.class,c);
+        return behSummaryDao.findBehByCriterion(c);
     }
 
     @Override