|
@@ -990,7 +990,7 @@ public class PersonInfoController {
|
|
|
@RequestParam(value="name",defaultValue="") String name,
|
|
|
@RequestParam(value="idCard",defaultValue="") String idCard,
|
|
|
@RequestParam(value="phone",defaultValue="") String phone,
|
|
|
- @RequestParam(value="companyCode",defaultValue="") String companyCode,
|
|
|
+ @RequestParam(value="parentId",defaultValue="") String parentId,
|
|
|
@RequestParam(value="subordinate",defaultValue="false") Boolean subordinate,
|
|
|
@RequestParam(value="position1",defaultValue="") String position1,
|
|
|
@RequestParam(value="position2",defaultValue="") String position2,
|
|
@@ -1079,17 +1079,21 @@ public class PersonInfoController {
|
|
|
searchParams.put("phone","%" + phone + "%");
|
|
|
}
|
|
|
|
|
|
- if (StringUtils.isEmpty(companyCode)){
|
|
|
- if (!userService.hasRole(subject,"SYSADMIN")) {
|
|
|
- searchParams.put("companyCode", companyInfo.getCode() + "%");
|
|
|
+ if (StringUtils.isNotEmpty(parentId)) {
|
|
|
+ CompanyInfo parent = companyInfoService.get(parentId);
|
|
|
+ String companyCode = parent!=null ? parent.getCode() : "";
|
|
|
+
|
|
|
+ if (StringUtils.isEmpty(companyCode)) {
|
|
|
+ if (subordinate) {
|
|
|
+ searchParams.put("companyCode", companyCode + "%");
|
|
|
+ } else {
|
|
|
+ searchParams.put("companyCode", companyCode);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
else{
|
|
|
- if(subordinate){
|
|
|
- searchParams.put("companyCode", companyCode + "%");
|
|
|
- }
|
|
|
- else {
|
|
|
- searchParams.put("companyCode", companyCode);
|
|
|
+ if (!userService.hasRole(subject, "SYSADMIN")) {
|
|
|
+ searchParams.put("companyCode", companyInfo.getCode() + "%");
|
|
|
}
|
|
|
}
|
|
|
// if (userService.hasRole(subject,"SYSADMIN")) {
|