|
@@ -188,8 +188,16 @@ public class PersonInfoController {
|
|
|
|
|
|
//设置用户身份
|
|
|
personInfo.setPopedom(personPopedom.getId());
|
|
|
+ if(StringUtils.isEmpty(personInfo.getHqStatus())){
|
|
|
+ personInfo.setHqStatus("0");
|
|
|
+ }
|
|
|
personInfoService.update(personInfo);
|
|
|
|
|
|
+ if(StringUtils.isEmpty(personInfo.getHqStatus()) || "0".equals(personInfo.getHqStatus())){
|
|
|
+ //如果后勤状态为空 或者为非后勤人员 则清空排序
|
|
|
+ personInfoService.updateNullForHqSortNo(personInfo.getId());
|
|
|
+ }
|
|
|
+
|
|
|
String personCompany = personInfo.getPersonCompany();
|
|
|
|
|
|
if(StringUtils.isNotEmpty(personCompany)) {
|
|
@@ -327,6 +335,12 @@ public class PersonInfoController {
|
|
|
|
|
|
int affectCount = personInfoService.update(personInfo);
|
|
|
|
|
|
+
|
|
|
+ if(StringUtils.isEmpty(personInfo.getHqStatus()) || "0".equals(personInfo.getHqStatus())){
|
|
|
+ //如果后勤状态为空 或者为非后勤人员 则清空排序
|
|
|
+ personInfoService.updateNullForHqSortNo(personInfo.getId());
|
|
|
+ }
|
|
|
+
|
|
|
String personCompany = personInfo.getPersonCompany();
|
|
|
String[] pcs = personCompany.split(",");
|
|
|
//删除
|
|
@@ -543,6 +557,7 @@ public class PersonInfoController {
|
|
|
@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 = "hqStatus",value = "后勤类型", required = false, paramType = "form",dataType = "String"),
|
|
|
@ApiImplicitParam(name = "position1",value = "一级位置", required = false, paramType = "form",dataType = "String"),
|
|
|
@ApiImplicitParam(name = "position2",value = "二级位置", required = false, paramType = "form",dataType = "String"),
|
|
|
@ApiImplicitParam(name = "position3",value = "三级位置", required = false, paramType = "form",dataType = "String"),
|
|
@@ -564,6 +579,7 @@ public class PersonInfoController {
|
|
|
@RequestParam(value="subordinate",defaultValue="false") Boolean subordinate,
|
|
|
@RequestParam(value="roleId",defaultValue="") String roleId,
|
|
|
@RequestParam(value="derviceName",defaultValue="") String derviceName,
|
|
|
+ @RequestParam(value="hqStatus",defaultValue="") String hqStatus,
|
|
|
@RequestParam(value="position1",defaultValue="") String position1,
|
|
|
@RequestParam(value="position2",defaultValue="") String position2,
|
|
|
@RequestParam(value="position3",defaultValue="") String position3,
|
|
@@ -589,7 +605,13 @@ public class PersonInfoController {
|
|
|
Map<String,Object> searchParams = new HashMap<>();
|
|
|
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
- sortList.add(new Sort("a.id_","asc"));
|
|
|
+
|
|
|
+ if(StringUtils.isNotEmpty(hqStatus)){
|
|
|
+ searchParams.put("hqStatus", hqStatus);
|
|
|
+ sortList.add(new Sort("a.hq_sort_no", "asc"));
|
|
|
+ }
|
|
|
+ sortList.add(new Sort("a.id_", "asc"));
|
|
|
+
|
|
|
|
|
|
if (StringUtils.isNotEmpty(id)) {
|
|
|
searchParams.put("id", id);
|
|
@@ -1281,6 +1303,7 @@ public class PersonInfoController {
|
|
|
personInfo.setCreateBy(subject);
|
|
|
personInfo.setCreateTime(new Date());
|
|
|
personInfo.setPopedom(personPopedom.getId());
|
|
|
+ personInfo.setHqStatus("0");
|
|
|
|
|
|
personInfoService.insert(personInfo);
|
|
|
|
|
@@ -1354,6 +1377,7 @@ public class PersonInfoController {
|
|
|
@RequestParam(value="idCard",defaultValue="") String idCard,
|
|
|
@RequestParam(value="phone",defaultValue="") String phone,
|
|
|
@RequestParam(value="parentId",defaultValue="") String parentId,
|
|
|
+ @RequestParam(value="hqStatus",defaultValue="") String hqStatus,
|
|
|
@RequestParam(value="subordinate",defaultValue="false") Boolean subordinate,
|
|
|
@RequestParam(value="position1",defaultValue="") String position1,
|
|
|
@RequestParam(value="position2",defaultValue="") String position2,
|
|
@@ -1448,6 +1472,9 @@ public class PersonInfoController {
|
|
|
if (StringUtils.isNotEmpty(phone)) {
|
|
|
searchParams.put("phone","%" + phone + "%");
|
|
|
}
|
|
|
+ if (StringUtils.isNotEmpty(hqStatus)) {
|
|
|
+ searchParams.put("hqStatus",hqStatus);
|
|
|
+ }
|
|
|
|
|
|
if (StringUtils.isNotEmpty(parentId)) {
|
|
|
CompanyInfo parent = companyInfoService.get(parentId);
|