起步软件技术论坛-X3

 找回密码
 立即注册
搜索
查看: 242|回复: 11

【结贴】关于任务中心的问题**

[复制链接]
发表于 2009-2-10 09:21:23 | 显示全部楼层 |阅读模式
在任务中心中新建一个工作任务后,选择好“处理部门”和“处理人”保存后,为什么本部门人所有的人在任务中心中都看到此任务,而不是只有处理人能看到???
回复

使用道具 举报

发表于 2009-2-10 09:36:52 | 显示全部楼层
楼主是那个版本,
使用system登陆以后运行下图中的功能,取消 任务中心过滤本部门 看看

snap1.png

35.49 KB, 下载次数: 116

回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-2-10 09:41:10 | 显示全部楼层
3012的版本,怎么没有你在图中标的那些啊??
回复 支持 反对

使用道具 举报

发表于 2009-2-10 10:02:03 | 显示全部楼层
那就是3012版本还没有提供出这个选项,
这个就需要修改一些任务中心信息的代码来实现了,楼主可以在论坛中找找,参考一下下面连接中的7楼:
http://bbs.justep.com/forum.php?mod=viewthread&tid=13473
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-2-10 10:22:50 | 显示全部楼层
http://bbs.justep.com/forum.php?mod=viewthread&tid=13473
7楼中的修改前的代码在业务模型\协同系统\任务\任务中心资源\任务桌面过滤 代码中找不到
回复 支持 反对

使用道具 举报

发表于 2009-2-10 10:55:11 | 显示全部楼层
业务模型\协同系统\任务\任务中心资源\事情常用过滤
现在应该修改这个单元了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-2-10 13:05:59 | 显示全部楼层
附件中是业务模型\协同系统\任务\任务中心资源\事情常用过滤
的相关代码,和此贴http://bbs.justep.com/forum.php?mod=viewthread&tid=13473    7楼中的修改前的代码不是完全一样?请详细说明下,具体如何改?谢谢

新建 文本文档 (3).txt

6.62 KB, 下载次数: 46

回复 支持 反对

使用道具 举报

发表于 2009-2-10 15:39:15 | 显示全部楼层
一共修改了3个地方,注释:“//20090210”是修改的


function TCIRCSCOMMONFILTER.RebuildRightsFilterText: string;
const
  SSOrgURLIn = 'T1.FSORGURL IN(%s) OR (T1.FSPERSON = ''%s'')';
  SSOrgURLIn_Pos = 'T1.FSORGURL IN(%s) OR ((T1.FSDEPT = ''%s'') AND ' +
    '(T1.FSPOSITION = ''%s'') AND (T1.FSPERSON = ''%s''))';
  //SSOrgURLLike = 'T1.FSORGURL LIKE ''%s%%''';
  SSOrgURLLike = 'T1.FSORGURL LIKE ''%s''';    // 20090210
  SSPositionWhere = 'T1.FSPOSITION = ''%s''';

  SROrgEmpty = 'T1.FRPERSONNAMES IS NULL OR T1.FRPERSONNAMES = ''''';

  SROrgURLIn = 'TTASKMESSAGE.FRORGURL IN(%s) OR (TTASKMESSAGE.FRPERSON = ''%s'') ';
  SROrgURLIn_Pos = 'TTASKMESSAGE.FRORGURL IN(%s) OR ((TTASKMESSAGE.FRDEPT = ''%s'') AND ' +
    '(TTASKMESSAGE.FRPOSITION = ''%s'') AND (TTASKMESSAGE.FRPERSON = ''%s''))';
  //SROrgURLLike = 'TTASKMESSAGE.FRORGURL LIKE ''%s%%''';
  SROrgURLLike = 'TTASKMESSAGE.FRORGURL LIKE ''%s''';   // 20090210
  SRPositionWhere = 'TTASKMESSAGE.FRPOSITION = ''%s''';

  SMain = 'FGUID IN(SELECT TTASKMESSAGE.FTASKGUID FROM TTASKMESSAGE WHERE (%s) UNION SELECT T1.FGUID FROM TTASK T1 WHERE (%s))';

  // 新闻公告和会议纪要在部门模式下,默认不可见
  cExceptTaskType1 = 'NOT (T1.FTYPE IN (''CHIEFMEETINGREC'', ''CHIEFMEETINGRECDEAL'', ''NEWSPLACARD''))';
  cExceptTaskType2 = 'NOT (TTask.FTYPE IN (''CHIEFMEETINGREC'', ''CHIEFMEETINGRECDEAL'', ''NEWSPLACARD''))';
var
  I: Integer;
  lBizURL: TBizURL;
  lKind: TOrgUnitKind;
  lOperatorID: string;
  lDept, lPos, lPer: string;
  lSend, lProces: TStringList;
  S, lDateTimeFilter: string;
  lProcesStr, lSendStr, lSql: string;
  lDeptEmpty: Boolean;
begin
  lBizURL := TBizURL.Create;
  lSend := TStringList.Create;
  lProces := TStringList.Create;
  try
    lDeptEmpty := not FPersonChecked and not FDeptChecked and
      (FCheckedSubordinationNodes.Count = 0);

    if FCheckedSubordinationNodes.Count > 0 then
      for I := 0 to FCheckedSubordinationNodes.Count - 1 do
      begin
        lSend.Add(SysUtils.Format(SSOrgURLLike, [DoGetQueryURLStr(TBizURL(FCheckedSubordinationNodes.Objects[I]).URL)]));
        lProces.Add(SysUtils.Format(SROrgURLLike, [DoGetQueryURLStr(TBizURL(FCheckedSubordinationNodes.Objects[I]).URL)]));
      end
    else
    begin
      if lDeptEmpty then
      begin
        for I := 0 to SubordinationURLs.Count - 1 do
        begin
          lBizURL.URL := SubordinationURLs[I];
          lKind := BizSys.BizSystem.GetObjectKind(lBizURL);
          if lKind = TOrgUnitKind.boPosition then
          begin
            lSend.Add(SysUtils.Format(SSPositionWhere, [lBizURL.ID]));
            lProces.Add(SysUtils.Format(SRPositionWhere, [lBizURL.ID]));
          end
          else
          begin
            lSend.Add(SysUtils.Format(SSOrgURLLike, [DoGetQueryURLStr(lBizURL.URL)]));
            lProces.Add(SysUtils.Format(SROrgURLLike, [DoGetQueryURLStr(lBizURL.URL)]));
          end
        end;
      end;
    end;

    if FPersonChecked or lDeptEmpty then
    begin
      if TOrgUtils.GetIsPersonMember(Context) then
      begin
        TContextUtils.GetContextOperator(Context, lDept, lPos, lPer);
        lSend.Add(SysUtils.Format(SSOrgURLIn_Pos, [DoGetQueryURLStr(PersonMemberURLs),
          lDept, lPos, lPer]));
        lProces.Add(SysUtils.Format(SROrgURLIn_Pos, [DoGetQueryURLStr(PersonMemberURLs),
          lDept, lPos, lPer]));
      end
      else
      begin
        lOperatorID := TContextUtils.GetOperator(Context).ID;
        lSend.Add(SysUtils.Format(SSOrgURLIn, [DoGetQueryURLStr(PersonMemberURLs), lOperatorID]));
        lProces.Add(SysUtils.Format(SROrgURLIn, [DoGetQueryURLStr(PersonMemberURLs), lOperatorID]));
      end;
    end;

    if FDeptChecked or lDeptEmpty then
    begin
      for I := 0 to SuperiorDeptURLs.Count - 1 do
      begin
        lBizURL.URL := SuperiorDeptURLs[I];
        lKind := BizSys.BizSystem.GetObjectKind(lBizURL);
        if lKind = TOrgUnitKind.boPosition then
        begin
          lSQL := SysUtils.Format(SSPositionWhere, [lBizURL.ID]);
          if SubordinationURLs.Count = 0 then
          begin
// 发到部门的也包含            lSQL := AddAndCondition(lSQL,'NOT('+SROrgEmpty+')');
            lSQL := AddAndCondition(lSQL, cExceptTaskType1);
          end;
          if not FPersonChecked and not lDeptEmpty then
          begin
            TContextUtils.GetContextOperator(Context, lDept, lPos, lPer);
            lSQL := AddAndCondition(lSQL, SysUtils.Format('NOT (%s)', [SysUtils.Format(SSOrgURLIn_Pos,
              [DoGetQueryURLStr(PersonMemberURLs), lDept, lPos, lPer])]));
          end;
          lSend.Add(lSQL);

          lSQL := SysUtils.Format(SRPositionWhere, [lBizURL.ID]);
          if SubordinationURLs.Count = 0 then //modify by maoguangyu 2007-5-12
          begin
// 发到部门的也包含            lSQL := AddAndCondition(lSQL, 'NOT(TTASKMESSAGE.FRPERSON IS NULL OR TTASKMESSAGE.FRPERSON = '''')');
            lSQL := AddAndCondition(lSQL, cExceptTaskType2);
          end;
          if not FPersonChecked and not lDeptEmpty then
          begin
            TContextUtils.GetContextOperator(Context, lDept, lPos, lPer);
            lSQL := AddAndCondition(lSQL, SysUtils.Format('NOT (%s)', [SysUtils.Format(SROrgURLIn_Pos,
              [DoGetQueryURLStr(PersonMemberAndParentURLs), lDept, lPos, lPer])]));
          end;
          lProces.Add(lSQL);
        end
        else
        begin
          lSQL := SysUtils.Format(SSOrgURLLike, [DoGetQueryURLStr(lBizURL.URL)]);
          if SubordinationURLs.Count = 0 then
          begin
// 发到部门的也包含            lSQL := AddAndCondition(lSQL,'NOT ('+ SROrgEmpty+')');
            lSQL := AddAndCondition(lSQL, cExceptTaskType1);
          end;
          if not FPersonChecked and not lDeptEmpty then
          begin
            lOperatorID := TContextUtils.GetOperator(Context).ID;
            lSQL := AddAndCondition(lSQL, SysUtils.Format('NOT (%s)', [SysUtils.Format(SSOrgURLIn,
              [DoGetQueryURLStr(PersonMemberURLs), lOperatorID])]));
          end;
          lSend.Add(lSQL);

          lSQL := SysUtils.Format(SROrgURLLike, [DoGetQueryURLStr(lBizURL.URL)]);
          if SubordinationURLs.Count = 0 then   //modify by maoguangyu 2007-5-12  过滤有问题
          begin
// 发到部门的也包含            lSQL := AddAndCondition(lSQL, 'NOT(TTASKMESSAGE.FRPERSON IS NULL OR TTASKMESSAGE.FRPERSON = '''')');
            lSQL := AddAndCondition(lSQL, cExceptTaskType2);
          end;
          if not FPersonChecked and not lDeptEmpty then
          begin
            {lSQL := AddAndCondition(lSQL, SysUtils.Format('NOT (%s)', [SysUtils.Format(SROrgURLIn,
              [DoGetQueryURLStr(PersonMemberAndParentURLs), lOperatorID])]));}
            lSQL := AddAndCondition(lSQL, SysUtils.Format('NOT (TTASKMESSAGE.FRORGURL IN (%s))', [DoGetQueryURLStr(PersonMemberURLs)]));   // 20090210
          end;
          lProces.Add(lSQL);
        end
      end;
    end;

    lProcesStr := JSSysUtils.FormatAndUniteStr(' OR ', '%s', lProces);
    lSendStr := JSSysUtils.FormatAndUniteStr(' OR ', '%s', lSend);

    Result := SysUtils.Format(SMain, [lProcesStr, lSendStr]);
    //为了使实现参与时间的过滤,故意做在这里的
    lDateTimeFilter := GetDateTimeFilter;
    if lDateTimeFilter <> '' then
      Result := SysUtils.Format('%s AND (%s)', [lDateTimeFilter, Result])
    else
      Result := SysUtils.Format('(%s)', [Result]);

    if ccbState.Text <> SAllState then
    begin
      if clbState.Checked[0] then
        Result := SysUtils.Format('%s AND (TTASK.FSTATE IN(%s))', [Result, DoGetTaskStatesQueryStr(TTask.CanProcessTaskStates)])
      else if clbState.Checked[1] then
        Result := SysUtils.Format('%s AND (TTASK.FSTATE IN(%s))', [Result, DoGetTaskStatesQueryStr(TTask.FinishedTaskStates)]);
    end;

    S := GetBizGroupFilterText;
    if S <> '' then
      Result := Result + ' and (' + S + ')';
  finally
    lProces.Free;
    lSend.Free;
    lBizURL.Free;
  end;
end;
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-2-11 11:20:36 | 显示全部楼层
按照你提供的方法改了之后还是没用
回复 支持 反对

使用道具 举报

发表于 2009-2-11 11:28:15 | 显示全部楼层
在我这里做过测试的
你编译、保存、签入了么?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-7-28 02:19 , Processed in 0.054783 second(s), 19 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表