Commit a2687147 by 谢海旭

过滤已结清数据 bug修复

1 parent f7f76624
......@@ -2166,7 +2166,13 @@ public class VehicleService extends AbstractCommonService {
//模糊搜索业务数据,反向生成组织+车辆树结构
if (search.getTermType() != null && StringUtils.isNotBlank(search.getTerm())) {
sw.start("task1");
//搜索车辆或设备
//搜索车辆或设备 非超管账号需要过滤已结清车辆数据
Integer excludeSettleFlag = null;
List<Long> roleIds = ShieldContextHolder.getRoleIds();
if (!roleIds.contains(ShieldContextHolder.ADMIN_ROLE_ID)) {
excludeSettleFlag = VehicleSettleFlagEnum.SETTLED.getCode();
}
search.setExcludeSettleFlag(excludeSettleFlag);
List<OrgVehicleModel> modelList = vehicleMapper.selectOrgVehicle(search);
if (CollectionUtils.isEmpty(modelList)) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!