添加成员过滤
This commit is contained in:
parent
1b5e215082
commit
48828f3528
Binary file not shown.
@ -458,4 +458,22 @@ public class CoECommonController {
|
|||||||
return treeWeb.searchParentOrgId(orgId);
|
return treeWeb.searchParentOrgId(orgId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal_search_user_tree_node")
|
||||||
|
public String searchUserInfo(UserContext me,String userName){
|
||||||
|
BPMOrgTreeWeb treeWeb = new BPMOrgTreeWeb(me);
|
||||||
|
return treeWeb.searchUserIdByName(userName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Mapping("com.actionsoft.apps.coe.pal_search_user_tree_parent_node")
|
||||||
|
public String searchParentUserId(UserContext me,String userid){
|
||||||
|
BPMOrgTreeWeb treeWeb = new BPMOrgTreeWeb(me);
|
||||||
|
return treeWeb.searchParentUserId(userid);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,12 +5,8 @@ import com.actionsoft.apps.coe.pal.util.BpmOrgUtil;
|
|||||||
import com.actionsoft.apps.coe.pal.util.HighSecurityUtil;
|
import com.actionsoft.apps.coe.pal.util.HighSecurityUtil;
|
||||||
import com.actionsoft.bpms.commons.mvc.view.ActionWeb;
|
import com.actionsoft.bpms.commons.mvc.view.ActionWeb;
|
||||||
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
|
import com.actionsoft.bpms.commons.mvc.view.ResponseObject;
|
||||||
import com.actionsoft.bpms.org.cache.DepartmentCache;
|
import com.actionsoft.bpms.org.cache.*;
|
||||||
import com.actionsoft.bpms.org.cache.RoleCache;
|
import com.actionsoft.bpms.org.model.*;
|
||||||
import com.actionsoft.bpms.org.model.CompanyModel;
|
|
||||||
import com.actionsoft.bpms.org.model.DepartmentModel;
|
|
||||||
import com.actionsoft.bpms.org.model.RoleModel;
|
|
||||||
import com.actionsoft.bpms.org.model.UserModel;
|
|
||||||
import com.actionsoft.bpms.server.UserContext;
|
import com.actionsoft.bpms.server.UserContext;
|
||||||
import com.actionsoft.bpms.util.UtilSerialize;
|
import com.actionsoft.bpms.util.UtilSerialize;
|
||||||
import com.actionsoft.bpms.util.UtilString;
|
import com.actionsoft.bpms.util.UtilString;
|
||||||
@ -324,6 +320,14 @@ public class BPMOrgTreeWeb extends ActionWeb {
|
|||||||
}
|
}
|
||||||
obj.put("icon", icon);
|
obj.put("icon", icon);
|
||||||
obj.put("leaf", true);
|
obj.put("leaf", true);
|
||||||
|
|
||||||
|
|
||||||
|
DepartmentModel departmentByUser = SDK.getORGAPI().getDepartmentByUser(model.getUID());
|
||||||
|
String[] pathIdArr = departmentByUser.getPathIdOfCache().split("/");
|
||||||
|
List<String> pathIdList = new ArrayList<>(Arrays.asList(pathIdArr));
|
||||||
|
pathIdList.add(departmentByUser.getCompanyId());
|
||||||
|
pathIdList.add(model.getUID());
|
||||||
|
obj.put("pathIdList",pathIdList);
|
||||||
data.add(obj);
|
data.add(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -391,4 +395,43 @@ public class BPMOrgTreeWeb extends ActionWeb {
|
|||||||
ro.setData(pathIds);
|
ro.setData(pathIds);
|
||||||
return ro.toString();
|
return ro.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String searchUserIdByName(String userName){
|
||||||
|
ResponseObject ro = ResponseObject.newOkResponse();
|
||||||
|
//部门
|
||||||
|
|
||||||
|
List<CompanyModel> companies = SDK.getORGAPI().getCompanys();
|
||||||
|
List<UserModel> userModelList = UserCache.getAllUserList();
|
||||||
|
|
||||||
|
List<String> result = new ArrayList<>();
|
||||||
|
|
||||||
|
result = userModelList.stream()
|
||||||
|
.filter(userModel -> userModel.getUserName().equals(userName))
|
||||||
|
.map(UserModel::getUID)
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
ro.setData(result);
|
||||||
|
return ro.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String searchParentUserId(String userid){
|
||||||
|
|
||||||
|
ResponseObject ro = ResponseObject.newOkResponse();
|
||||||
|
DepartmentModel departmentByUser = SDK.getORGAPI().getDepartmentByUser(userid);
|
||||||
|
|
||||||
|
String pathIdStr = departmentByUser.getPathIdOfCache();
|
||||||
|
String[] pathIds = pathIdStr.split("/");
|
||||||
|
|
||||||
|
List datalist=new ArrayList<>(Arrays.asList(pathIds));
|
||||||
|
datalist.add(userid);
|
||||||
|
|
||||||
|
datalist.add(departmentByUser.getCompanyId());
|
||||||
|
ro.setData(datalist);
|
||||||
|
return ro.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,7 +43,7 @@ public final class PublishListHistory extends DaoObject<PublishListHistoryModel>
|
|||||||
paraMap.put("PALREPOSITORYID", model.getPalRepositoryId());
|
paraMap.put("PALREPOSITORYID", model.getPalRepositoryId());
|
||||||
paraMap.put("ACTIONTYPE", model.getActionType());
|
paraMap.put("ACTIONTYPE", model.getActionType());
|
||||||
paraMap.put("PUBLISHDESC", model.getPublishDesc());
|
paraMap.put("PUBLISHDESC", model.getPublishDesc());
|
||||||
paraMap.put("TASKID", model.getTaskId());
|
paraMap.put("TASKID",model.getTaskId());
|
||||||
return DBSql.update(sql, paraMap);
|
return DBSql.update(sql, paraMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -452,8 +452,8 @@ public final class PublishListHistory extends DaoObject<PublishListHistoryModel>
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public String getLastPublishTaskIdByModelId(String repositoryId) {
|
public String getLastPublishTaskIdByModelId(String repositoryId) {
|
||||||
//String sql = "SELECT pl.TASKID FROM APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl WHERE pl.pid = p.id AND pl.palrepositoryid = ? ORDER BY publishdate DESC";
|
String sql = "SELECT pl.TASKID FROM APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl WHERE pl.pid = p.id AND pl.palrepositoryid = ? ORDER BY publishdate DESC";
|
||||||
String sql="SELECT TASKID FROM (SELECT TASKID FROM BO_ACT_COE_PUBLISH_N WHERE PUBLISHFILEID=? ORDER BY CREATEDATE DESC) WHERE ROWNUM=1";
|
//String sql="SELECT TASKID FROM (SELECT TASKID FROM BO_ACT_COE_PUBLISH_N WHERE PUBLISHFILEID=? ORDER BY CREATEDATE DESC) WHERE ROWNUM=1";
|
||||||
String taskId = DBSql.getObject(sql, new RowMapper<String>() {
|
String taskId = DBSql.getObject(sql, new RowMapper<String>() {
|
||||||
@Override
|
@Override
|
||||||
public String mapRow(ResultSet rs, int arg1) throws SQLException {
|
public String mapRow(ResultSet rs, int arg1) throws SQLException {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user