【add】数据权限获取新增null判断
This commit is contained in:
parent
d83f96c601
commit
a32d491b63
|
@ -1,7 +1,6 @@
|
||||||
package com.chint.manage.util;
|
package com.chint.manage.util;
|
||||||
|
|
||||||
import com.chint.domain.aggregates.user.User;
|
import com.chint.domain.aggregates.user.User;
|
||||||
import com.chint.domain.value_object.system.SystemOrganizationVO;
|
|
||||||
import com.chint.infrastructure.util.BaseContext;
|
import com.chint.infrastructure.util.BaseContext;
|
||||||
import com.chint.manage.entity.RouteOrderExtensionFieldBasic;
|
import com.chint.manage.entity.RouteOrderExtensionFieldBasic;
|
||||||
import com.chint.manage.mapper.JdbcOrderDetailBasicRepository;
|
import com.chint.manage.mapper.JdbcOrderDetailBasicRepository;
|
||||||
|
@ -30,17 +29,20 @@ public class BaseUtil {
|
||||||
|
|
||||||
public List<Long> getRouteIds(){
|
public List<Long> getRouteIds(){
|
||||||
List<String> list = BaseContext.getCurrentUser().loadRoleOrg().getRoleOrgCodeList().stream().filter(Objects::nonNull).toList();
|
List<String> list = BaseContext.getCurrentUser().loadRoleOrg().getRoleOrgCodeList().stream().filter(Objects::nonNull).toList();
|
||||||
|
if (list.isEmpty()) return null;
|
||||||
List<RouteOrderExtensionFieldBasic> result= jdbcRouteOrderExtensionFieldBasicRepository.findAllByBelongDeptCodeIn(list);
|
List<RouteOrderExtensionFieldBasic> result= jdbcRouteOrderExtensionFieldBasicRepository.findAllByBelongDeptCodeIn(list);
|
||||||
return result.stream().map(RouteOrderExtensionFieldBasic::getRouteId).toList();
|
return result.stream().map(RouteOrderExtensionFieldBasic::getRouteId).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Long> getOrderIds(){
|
public List<Long> getOrderIds(){
|
||||||
List<Long> routeIds = getRouteIds();
|
List<Long> routeIds = getRouteIds();
|
||||||
|
if (routeIds.isEmpty()) return null;
|
||||||
return jdbcOrderDetailBasicRepository.findAllOrderId(routeIds);
|
return jdbcOrderDetailBasicRepository.findAllOrderId(routeIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<String> getOrderNos(){
|
public List<String> getOrderNos(){
|
||||||
List<Long> routeIds = getRouteIds();
|
List<Long> routeIds = getRouteIds();
|
||||||
|
if (routeIds.isEmpty()) return null;
|
||||||
return jdbcOrderDetailBasicRepository.findAllOrderNo(routeIds);
|
return jdbcOrderDetailBasicRepository.findAllOrderNo(routeIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue