人员选择-->添加过滤条件
This commit is contained in:
+12
-3
@@ -1426,7 +1426,7 @@ public class SysUserController {
|
||||
List<SysUser> sysUserList = sysUserService.getUserListByDepIds(departIds);
|
||||
String json = sysPushVO.getJson();
|
||||
List<SysDepartUserTreeModel> allJson = JSONObject.parseArray(json, SysDepartUserTreeModel.class);
|
||||
dealwithTree(departId, departTreeModelList, allJson,sysUserList);
|
||||
dealwithTree(departId, departTreeModelList, allJson,sysUserList,sysPushVO.getFlag());
|
||||
result.setResult(allJson);
|
||||
} else {
|
||||
List<SysDepartUserTreeModel> departUserTreeModelList = new ArrayList<>();
|
||||
@@ -1434,6 +1434,10 @@ public class SysUserController {
|
||||
//复制
|
||||
SysDepartUserTreeModel target = new SysDepartUserTreeModel();
|
||||
BeanUtils.copyProperties(sysDepartTreeModel, target);
|
||||
//flag=1,为人员选择标识,此时部门禁选,只能选择部门
|
||||
if("1".equals(sysPushVO.getFlag())){
|
||||
target.setDisableCheckbox("true");
|
||||
}
|
||||
departUserTreeModelList.add(target);
|
||||
}
|
||||
result.setResult(departUserTreeModelList);
|
||||
@@ -1509,7 +1513,8 @@ public class SysUserController {
|
||||
private void dealwithTree(String departId,
|
||||
List<SysDepartTreeModel> departTreeModelList,
|
||||
List<SysDepartUserTreeModel> json,
|
||||
List<SysUser> sysUserList) {
|
||||
List<SysUser> sysUserList,
|
||||
String flag) {
|
||||
for (SysDepartUserTreeModel sysDepartUserTreeModel : json) {
|
||||
String id = sysDepartUserTreeModel.getId();
|
||||
if (id.equals(departId)) {
|
||||
@@ -1518,6 +1523,10 @@ public class SysUserController {
|
||||
//复制
|
||||
SysDepartUserTreeModel target = new SysDepartUserTreeModel();
|
||||
BeanUtils.copyProperties(sysDepartTreeModel, target);
|
||||
//flag=1,为人员选择标识,此时部门禁选,只能选择部门
|
||||
if("1".equals(flag)){
|
||||
target.setDisableCheckbox("true");
|
||||
}
|
||||
treeList.add(target);
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(sysUserList)){
|
||||
@@ -1541,7 +1550,7 @@ public class SysUserController {
|
||||
List<SysDepartUserTreeModel> children = sysDepartUserTreeModel.getChildren();
|
||||
if (CollectionUtils.isNotEmpty(children)) {
|
||||
//复制
|
||||
dealwithTree(departId, departTreeModelList, children,sysUserList);
|
||||
dealwithTree(departId, departTreeModelList, children,sysUserList,flag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
@@ -16,4 +16,9 @@ public class SysPushVO {
|
||||
* 列表JSON
|
||||
*/
|
||||
private String json;
|
||||
|
||||
/**
|
||||
* 标识(flag = 0-->推送,flag = 1-->人员选择)
|
||||
*/
|
||||
private String flag;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user