java

Java code posted
created at 21 Oct 05:58, updated at 28 Oct 11:45

Edit | Back
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public Boolean isTheAccountToApprove(List<String> groupandrole,
      Long flownodeId) {
    if (flownodeId == null)
      return false;
    TFlowNodeCM node = get(TFlowNodeCM.class, flownodeId);
    TPriGroupCM group = node.getTPriGroup();
    TPriRoleCM role = node.getTPriRole();
    for (int i = 0; i < groupandrole.size(); i++) {
      String[] gr = groupandrole.get(i).split("a");
      String groupid = gr[0];
      String roleid = gr[1];
      if (roleid.equals(role.getME_roleid().toString())
          && groupid.equals(group.getME_groupid().toString()))
        return true;
    }

    return false;
  }
589 Bytes in 2 ms with coderay