|
@@ -28,7 +28,9 @@ import com.jeeplus.modules.wexinpackage.access.util.access.AddressDepartment;
|
|
|
import com.jeeplus.modules.wexinpackage.access.util.access.WeChatParamsUtil;
|
|
|
import com.jeeplus.modules.workclientinfo.entity.WorkClientLinkman;
|
|
|
import com.jeeplus.modules.workstaff.entity.WorkStaffBasicInfo;
|
|
|
+import com.jeeplus.modules.workstaff.entity.WorkStaffCertificate;
|
|
|
import com.jeeplus.modules.workstaff.service.WorkStaffBasicInfoService;
|
|
|
+import org.apache.commons.lang3.StringEscapeUtils;
|
|
|
import org.apache.shiro.authz.annotation.Logical;
|
|
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -500,6 +502,8 @@ public class OfficeController extends BaseController {
|
|
|
//存放部门搜索添加
|
|
|
office.setOldName(selectName);
|
|
|
}
|
|
|
+ HashSet<Map<String, Object>> mapSet = new HashSet<>();
|
|
|
+ //查询所有有关部门
|
|
|
List<Office> list = officeService.findByParentIdsLike(office);
|
|
|
for (int i = 0; i < list.size(); i++) {
|
|
|
Office e = list.get(i);
|
|
@@ -513,16 +517,28 @@ public class OfficeController extends BaseController {
|
|
|
map.put("pIds", e.getParentIds());
|
|
|
map.put("name", e.getTopCompany());
|
|
|
map.put("selectName", selectName);
|
|
|
- if (type != null && "3".equals(type)) {
|
|
|
+ if (type != null && ("3".equals(type) || "4".equals(type))) {
|
|
|
map.put("isParent", true);
|
|
|
}
|
|
|
+ if("4".equals(type)){
|
|
|
+ //根据参数获取信息
|
|
|
+ List<User> listUser = systemService.treeDataByNameOnReported(e.getId(),selectName);
|
|
|
+ if(listUser.size()>0) {
|
|
|
+ mapSet.add(map);
|
|
|
+ }
|
|
|
+ }
|
|
|
mapList.add(map);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if("4".equals(type)){
|
|
|
+ List<Map<String,Object>> mapList1=new ArrayList<>(mapSet);
|
|
|
+ return mapList1;
|
|
|
+ }
|
|
|
if(!"2".equals(type)){
|
|
|
List<User> userList= new ArrayList<>();
|
|
|
- HashSet<Map<String, Object>> mapSet = new HashSet<>();
|
|
|
- if (null != selectName && "" != selectName){
|
|
|
+ //判定参数必须存在
|
|
|
+ if (StringUtils.isNotBlank(selectName)){
|
|
|
userList = systemService.findUserByName(selectName);
|
|
|
if (0 != userList.size()){
|
|
|
Iterator it = mapList.iterator();
|
|
@@ -548,8 +564,7 @@ public class OfficeController extends BaseController {
|
|
|
List<Map<String,Object>> mapList1=new ArrayList<>(mapSet);
|
|
|
return mapList1;
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
+ }
|
|
|
}
|
|
|
return mapList;
|
|
|
}
|