|
@@ -229,6 +229,9 @@ public class PersonInfoController {
|
|
|
PersonCompany classPersonCompany = null;
|
|
|
for(String pc : pcs){
|
|
|
//添加
|
|
|
+ if(StringUtils.isEmpty(pc)){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
classPersonCompany = new PersonCompany();
|
|
|
classPersonCompany.setId(UUID.randomUUID().toString());
|
|
|
classPersonCompany.setCompanyId(pc);
|
|
@@ -431,6 +434,7 @@ public class PersonInfoController {
|
|
|
@ApiImplicitParam(name = "idCard",value = "身份证", required = false, paramType = "form",dataType = "String"),
|
|
|
@ApiImplicitParam(name = "phone",value = "手机号", required = false, paramType = "form",dataType = "String"),
|
|
|
@ApiImplicitParam(name = "companyCode",value = "企业编码", required = false, paramType = "form",dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "parentId",value = "上级企业ID", required = false, paramType = "form",dataType = "String"),
|
|
|
@ApiImplicitParam(name = "subordinate",value = "会否保护下级单位", required = false, paramType = "form",dataType = "String"),
|
|
|
@ApiImplicitParam(name = "derviceName",value = "设备名称", required = false, paramType = "form",dataType = "String"),
|
|
|
@ApiImplicitParam(name = "position1",value = "一级位置", required = false, paramType = "form",dataType = "String"),
|
|
@@ -446,6 +450,7 @@ public class PersonInfoController {
|
|
|
@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="derviceName",defaultValue="") String derviceName,
|
|
|
@RequestParam(value="position1",defaultValue="") String position1,
|
|
@@ -502,6 +507,26 @@ public class PersonInfoController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ if(StringUtils.isNotEmpty(parentId)){
|
|
|
+ CompanyInfo parentCompanyInfo = companyInfoService.get(parentId);
|
|
|
+
|
|
|
+ String parentCode = parentCompanyInfo.getCode();
|
|
|
+
|
|
|
+ if (StringUtils.isEmpty(parentCode)){
|
|
|
+ if (!userService.hasRole(subject,"SYSADMIN")) {
|
|
|
+ searchParams.put("companyCode", parentCode + "%");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ if(subordinate){
|
|
|
+ searchParams.put("companyCode", parentCode + "%");
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ searchParams.put("companyCode", parentCode);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (StringUtils.isNotEmpty(position1)) {
|
|
|
searchParams.put("position1","%" + position1 + "%");
|
|
|
}
|