Commit beb9f47e authored by maoying's avatar maoying

修改建筑树查询空指针

parent 1a55aefb
...@@ -132,7 +132,7 @@ public interface JcsFeign { ...@@ -132,7 +132,7 @@ public interface JcsFeign {
* @return ResponseModel<OrgUsrDto> * @return ResponseModel<OrgUsrDto>
*/ */
@GetMapping(value = "/org-usr/{authKey}/treeWithAuth") @GetMapping(value = "/org-usr/{authKey}/treeWithAuth")
FeignClientResult<List<OrgMenuDto>> getCompanyDeptTreeWithAuth(@PathVariable String authKey, @RequestParam(required = false) String orgType); FeignClientResult<List<OrgMenuDto>> getCompanyDeptTreeWithAuth(@PathVariable(value = "authKey") String authKey, @RequestParam(value = "orgTypes", required = false) String orgType);
/** /**
* 查询有权限的公司部门列表 * 查询有权限的公司部门列表
...@@ -142,7 +142,7 @@ public interface JcsFeign { ...@@ -142,7 +142,7 @@ public interface JcsFeign {
* @return ResponseModel<OrgUsrDto> * @return ResponseModel<OrgUsrDto>
*/ */
@GetMapping(value = "/org-usr/{authKey}/listWithAuth") @GetMapping(value = "/org-usr/{authKey}/listWithAuth")
FeignClientResult<List<OrgUsrDto>> getCompanyDeptListWithAuth(@PathVariable String authKey, @RequestParam(required = false) String orgTypes); FeignClientResult<List<OrgUsrDto>> getCompanyDeptListWithAuth(@PathVariable(value = "authKey") String authKey, @RequestParam(value = "orgTypes", required = false) String orgTypes);
/** /**
* 获取机场人员 * 获取机场人员
...@@ -151,7 +151,7 @@ public interface JcsFeign { ...@@ -151,7 +151,7 @@ public interface JcsFeign {
*/ */
@RequestMapping(value = "/org-usr/company/bizOrgCode/list", method = RequestMethod.GET, consumes = "application/json") @RequestMapping(value = "/org-usr/company/bizOrgCode/list", method = RequestMethod.GET, consumes = "application/json")
ResponseModel<OrgUsrDto> getCompanyByBizOrgCodeList( ResponseModel<OrgUsrDto> getCompanyByBizOrgCodeList(
@RequestParam(required = false) String bizOrgCode); @RequestParam(value = "bizOrgCode", required = false) String bizOrgCode);
/** /**
* 根据amosId查询人员 * 根据amosId查询人员
...@@ -160,7 +160,7 @@ public interface JcsFeign { ...@@ -160,7 +160,7 @@ public interface JcsFeign {
*/ */
@RequestMapping(value = "/org-usr/find/getByAmosId", method = RequestMethod.GET, consumes = "application/json") @RequestMapping(value = "/org-usr/find/getByAmosId", method = RequestMethod.GET, consumes = "application/json")
ResponseModel<List<OrgUsrDto>> getByAmosId( ResponseModel<List<OrgUsrDto>> getByAmosId(
@RequestParam(required = false) List<String> amosIds); @RequestParam(value = "amosIds", required = false) List<String> amosIds);
/** /**
* 根据amosId查询人员 * 根据amosId查询人员
...@@ -169,6 +169,6 @@ public interface JcsFeign { ...@@ -169,6 +169,6 @@ public interface JcsFeign {
*/ */
@RequestMapping(value = "/equip/getMaintenanceId", method = RequestMethod.GET, consumes = "application/json") @RequestMapping(value = "/equip/getMaintenanceId", method = RequestMethod.GET, consumes = "application/json")
ResponseModel<Long> getMaintenanceId( ResponseModel<Long> getMaintenanceId(
@RequestParam() String userId); @RequestParam(value = "userId") String userId);
} }
...@@ -43,6 +43,7 @@ import org.springframework.context.annotation.Lazy; ...@@ -43,6 +43,7 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.exception.BaseException; import org.typroject.tyboot.core.foundation.exception.BaseException;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
...@@ -1331,7 +1332,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -1331,7 +1332,7 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
vo.setName(orgUsrDto.getBizOrgName()); vo.setName(orgUsrDto.getBizOrgName());
vo.setId(orgUsrDto.getSequenceNbr()); vo.setId(orgUsrDto.getSequenceNbr());
vo.setBizOrgName(orgUsrDto.getBizOrgName()); vo.setBizOrgName(orgUsrDto.getBizOrgName());
vo.setTotal(buildingTreeVos.stream().filter(b -> b.getBizOrgCode() != null && b.getBizOrgCode().contains(vo.getBizOrgCode()) && "building".equals(b.getGroupType())).count()); vo.setTotal(buildingTreeVos.stream().filter(b -> !ObjectUtils.isEmpty(b.getBizOrgCode()) && b.getBizOrgCode().contains(ObjectUtils.isEmpty(vo.getBizOrgCode())?"":vo.getBizOrgCode()) && "building".equals(b.getGroupType())).count());
return vo; return vo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
// 3.将建筑的bizOrgCode转换为parentId连接树 ,拼接数据准备 // 3.将建筑的bizOrgCode转换为parentId连接树 ,拼接数据准备
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment