鉴权相关操作还原
This commit is contained in:
+40
-40
@@ -294,18 +294,18 @@ public class StBbzxOrderInfoController {
|
|||||||
}
|
}
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
//餐品总库只查询内置食堂
|
//餐品总库只查询内置食堂
|
||||||
// if(sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_0) || sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_1)){
|
if(sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_0) || sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_1)){
|
||||||
// // 后期分数据权限时在解开注释,此处管理员账户能看到所有食堂数据
|
// 后期分数据权限时在解开注释,此处管理员账户能看到所有食堂数据
|
||||||
//// ScreenVo screenVo = new ScreenVo();
|
// ScreenVo screenVo = new ScreenVo();
|
||||||
//// screenVo.setId(CommonConstant.INLAY_CANTEEN_ID);
|
// screenVo.setId(CommonConstant.INLAY_CANTEEN_ID);
|
||||||
//// canteenIdList.add(screenVo);
|
// canteenIdList.add(screenVo);
|
||||||
// } else if (sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_4)) {
|
} else if (sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_4)) {
|
||||||
// //查询当前登录用户的食堂列表
|
//查询当前登录用户的食堂列表
|
||||||
// String canteenId = sysUser.getCanteenId();
|
String canteenId = sysUser.getCanteenId();
|
||||||
// query.setCanteenId(canteenId);
|
query.setCanteenId(canteenId);
|
||||||
// } else {
|
} else {
|
||||||
// return Result.OK();
|
return Result.OK();
|
||||||
// }
|
}
|
||||||
query.setStatus(3);//(充值=102
|
query.setStatus(3);//(充值=102
|
||||||
return Result.OK(iStClientMemberTransactionRecordService.pageQuery(query));
|
return Result.OK(iStClientMemberTransactionRecordService.pageQuery(query));
|
||||||
}
|
}
|
||||||
@@ -323,20 +323,20 @@ public class StBbzxOrderInfoController {
|
|||||||
query.setStartTime(split[0]);
|
query.setStartTime(split[0]);
|
||||||
query.setEndTime(split[1]);
|
query.setEndTime(split[1]);
|
||||||
}
|
}
|
||||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
// //餐品总库只查询内置食堂
|
//餐品总库只查询内置食堂
|
||||||
// if(sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_0) || sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_1)){
|
if(sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_0) || sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_1)){
|
||||||
// // 后期分数据权限时在解开注释,此处管理员账户能看到所有食堂数据
|
// 后期分数据权限时在解开注释,此处管理员账户能看到所有食堂数据
|
||||||
//// ScreenVo screenVo = new ScreenVo();
|
// ScreenVo screenVo = new ScreenVo();
|
||||||
//// screenVo.setId(CommonConstant.INLAY_CANTEEN_ID);
|
// screenVo.setId(CommonConstant.INLAY_CANTEEN_ID);
|
||||||
//// canteenIdList.add(screenVo);
|
// canteenIdList.add(screenVo);
|
||||||
// } else if (sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_4)) {
|
} else if (sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_4)) {
|
||||||
// //查询当前登录用户的食堂列表
|
//查询当前登录用户的食堂列表
|
||||||
// String canteenId = sysUser.getCanteenId();
|
String canteenId = sysUser.getCanteenId();
|
||||||
// query.setCanteenId(canteenId);
|
query.setCanteenId(canteenId);
|
||||||
// } else {
|
} else {
|
||||||
// return Result.OK();
|
return Result.OK();
|
||||||
// }
|
}
|
||||||
query.setStatus(3);//(充值=102
|
query.setStatus(3);//(充值=102
|
||||||
List<StClientMemberTransactionRecordVO> statisticsCanteenBusiness = iStClientMemberTransactionRecordService.queryList(query);
|
List<StClientMemberTransactionRecordVO> statisticsCanteenBusiness = iStClientMemberTransactionRecordService.queryList(query);
|
||||||
StClientMemberTransactionRecordVO sumResult = GenericSumUtil.sumList(statisticsCanteenBusiness, StClientMemberTransactionRecordVO.class);
|
StClientMemberTransactionRecordVO sumResult = GenericSumUtil.sumList(statisticsCanteenBusiness, StClientMemberTransactionRecordVO.class);
|
||||||
@@ -358,20 +358,20 @@ public class StBbzxOrderInfoController {
|
|||||||
query.setStartTime(split[0]);
|
query.setStartTime(split[0]);
|
||||||
query.setEndTime(split[1]);
|
query.setEndTime(split[1]);
|
||||||
}
|
}
|
||||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
// //餐品总库只查询内置食堂
|
//餐品总库只查询内置食堂
|
||||||
// if(sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_0) || sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_1)){
|
if(sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_0) || sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_1)){
|
||||||
// // 后期分数据权限时在解开注释,此处管理员账户能看到所有食堂数据
|
// 后期分数据权限时在解开注释,此处管理员账户能看到所有食堂数据
|
||||||
//// ScreenVo screenVo = new ScreenVo();
|
// ScreenVo screenVo = new ScreenVo();
|
||||||
//// screenVo.setId(CommonConstant.INLAY_CANTEEN_ID);
|
// screenVo.setId(CommonConstant.INLAY_CANTEEN_ID);
|
||||||
//// canteenIdList.add(screenVo);
|
// canteenIdList.add(screenVo);
|
||||||
// } else if (sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_4)) {
|
} else if (sysUser.getUserIdentity().equals(CommonConstant.USER_IDENTITY_4)) {
|
||||||
// //查询当前登录用户的食堂列表
|
//查询当前登录用户的食堂列表
|
||||||
// String canteenId = sysUser.getCanteenId();
|
String canteenId = sysUser.getCanteenId();
|
||||||
// query.setCanteenId(canteenId);
|
query.setCanteenId(canteenId);
|
||||||
// } else {
|
} else {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
query.setStatus(3);//(充值=102
|
query.setStatus(3);//(充值=102
|
||||||
List<StClientMemberTransactionRecordVO> statisticsCanteenBusiness = iStClientMemberTransactionRecordService.queryList(query);
|
List<StClientMemberTransactionRecordVO> statisticsCanteenBusiness = iStClientMemberTransactionRecordService.queryList(query);
|
||||||
if(org.apache.commons.collections4.CollectionUtils.isNotEmpty(statisticsCanteenBusiness)){
|
if(org.apache.commons.collections4.CollectionUtils.isNotEmpty(statisticsCanteenBusiness)){
|
||||||
|
|||||||
+24
-24
@@ -445,15 +445,15 @@ public class StBbzxOrderInfoServiceImpl extends JeecgServiceImpl<StBbzxOrderInfo
|
|||||||
|
|
||||||
//权限校验
|
//权限校验
|
||||||
|
|
||||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
List<String> canteenIds = new ArrayList<>();
|
List<String> canteenIds = new ArrayList<>();
|
||||||
// if(StringUtils.isEmpty(canteenId)){
|
if(StringUtils.isEmpty(canteenId)){
|
||||||
// if(sysUser != null){
|
if(sysUser != null){
|
||||||
// canteenIds = sysUser.getCanteenIdList().stream().map(ScreenVo::getId).collect(Collectors.toList());
|
canteenIds = sysUser.getCanteenIdList().stream().map(ScreenVo::getId).collect(Collectors.toList());
|
||||||
// }
|
}
|
||||||
// }else {
|
}else {
|
||||||
canteenIds = Collections.singletonList(canteenId);
|
canteenIds = Collections.singletonList(canteenId);
|
||||||
// }
|
}
|
||||||
//获取数据列表
|
//获取数据列表
|
||||||
List<StatisticsTheAmountSpentVo> statisticsTheAmountSpentVos = baseMapper.statisticsTheAmountSpent(canteenIds, startDate, endDate);
|
List<StatisticsTheAmountSpentVo> statisticsTheAmountSpentVos = baseMapper.statisticsTheAmountSpent(canteenIds, startDate, endDate);
|
||||||
if(CollectionUtils.isEmpty(statisticsTheAmountSpentVos)){
|
if(CollectionUtils.isEmpty(statisticsTheAmountSpentVos)){
|
||||||
@@ -505,15 +505,15 @@ public class StBbzxOrderInfoServiceImpl extends JeecgServiceImpl<StBbzxOrderInfo
|
|||||||
|
|
||||||
//权限校验
|
//权限校验
|
||||||
|
|
||||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
List<String> canteenIds = new ArrayList<>();
|
List<String> canteenIds = new ArrayList<>();
|
||||||
// if(StringUtils.isEmpty(canteenId)){
|
if(StringUtils.isEmpty(canteenId)){
|
||||||
// if(sysUser != null){
|
if(sysUser != null){
|
||||||
// canteenIds = sysUser.getCanteenIdList().stream().map(ScreenVo::getId).collect(Collectors.toList());
|
canteenIds = sysUser.getCanteenIdList().stream().map(ScreenVo::getId).collect(Collectors.toList());
|
||||||
// }
|
}
|
||||||
// }else {
|
}else {
|
||||||
canteenIds = Collections.singletonList(canteenId);
|
canteenIds = Collections.singletonList(canteenId);
|
||||||
// }
|
}
|
||||||
//获取数据列表
|
//获取数据列表
|
||||||
List<StatisticsTheAmountSpentVo> statisticsTheAmountSpentVos = baseMapper.statisticsTheAmountSpent(canteenIds, startDate, endDate);
|
List<StatisticsTheAmountSpentVo> statisticsTheAmountSpentVos = baseMapper.statisticsTheAmountSpent(canteenIds, startDate, endDate);
|
||||||
if(CollectionUtils.isEmpty(statisticsTheAmountSpentVos)){
|
if(CollectionUtils.isEmpty(statisticsTheAmountSpentVos)){
|
||||||
@@ -577,16 +577,16 @@ public class StBbzxOrderInfoServiceImpl extends JeecgServiceImpl<StBbzxOrderInfo
|
|||||||
eatDay = startDate + "~" + endDate;
|
eatDay = startDate + "~" + endDate;
|
||||||
}
|
}
|
||||||
//权限校验
|
//权限校验
|
||||||
// LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
// List<String> canteenIds = new ArrayList<>();
|
List<String> canteenIds = new ArrayList<>();
|
||||||
// if(StringUtils.isEmpty(canteenId)){
|
if(StringUtils.isEmpty(canteenId)){
|
||||||
// if(sysUser != null){
|
if(sysUser != null){
|
||||||
// canteenIds = sysUser.getCanteenIdList().stream().map(ScreenVo::getId).collect(Collectors.toList());
|
canteenIds = sysUser.getCanteenIdList().stream().map(ScreenVo::getId).collect(Collectors.toList());
|
||||||
// }
|
}
|
||||||
// }else {
|
}else {
|
||||||
// canteenIds = Collections.singletonList(canteenId);
|
canteenIds = Collections.singletonList(canteenId);
|
||||||
// }
|
}
|
||||||
List<StatisticsTheAmountSpentVo> statisticsTheAmountSpentVos = baseMapper.statisticsTheAmountSpentEveryMember(null,name,payName,startDate, endDate, secondDepartId, thirdDepartId);
|
List<StatisticsTheAmountSpentVo> statisticsTheAmountSpentVos = baseMapper.statisticsTheAmountSpentEveryMember(canteenIds,name,payName,startDate, endDate, secondDepartId, thirdDepartId);
|
||||||
if(CollectionUtils.isEmpty(statisticsTheAmountSpentVos)){
|
if(CollectionUtils.isEmpty(statisticsTheAmountSpentVos)){
|
||||||
return new Page<>();
|
return new Page<>();
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -34,11 +34,11 @@ public class StBaseRestaurantDeptController {
|
|||||||
@Operation(summary = "获得食堂数据", description= "获得食堂数据")
|
@Operation(summary = "获得食堂数据", description= "获得食堂数据")
|
||||||
@GetMapping(value = "/getRestaurantList")
|
@GetMapping(value = "/getRestaurantList")
|
||||||
public Result<?> getRestaurantList() {
|
public Result<?> getRestaurantList() {
|
||||||
// LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
// List<ScreenVo> list = user.getCanteenIdList();
|
List<ScreenVo> list = user.getCanteenIdList();
|
||||||
// if(CollectionUtils.isNotEmpty(list)){
|
if(CollectionUtils.isNotEmpty(list)){
|
||||||
// return Result.OK(list);
|
return Result.OK(list);
|
||||||
// } else {//解决管理员(医生)角色,查看 营养监控 没有食堂列表问题
|
} else {//解决管理员(医生)角色,查看 营养监控 没有食堂列表问题
|
||||||
List<ScreenVo> screenVoArrayList = new ArrayList<>();
|
List<ScreenVo> screenVoArrayList = new ArrayList<>();
|
||||||
List<SlBaseRestaurant> slBaseRestaurantList = slBaseRestaurantService.list();
|
List<SlBaseRestaurant> slBaseRestaurantList = slBaseRestaurantService.list();
|
||||||
if(CollectionUtils.isNotEmpty(slBaseRestaurantList)){
|
if(CollectionUtils.isNotEmpty(slBaseRestaurantList)){
|
||||||
@@ -52,7 +52,7 @@ public class StBaseRestaurantDeptController {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
return Result.OK(screenVoArrayList);
|
return Result.OK(screenVoArrayList);
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "获得食堂数据", description= "获得食堂数据")
|
@Operation(summary = "获得食堂数据", description= "获得食堂数据")
|
||||||
|
|||||||
Reference in New Issue
Block a user