Просмотр исходного кода

事项提醒,之前首页展示的是缴费项目数量,现在展示乐团数量。和跳转过去的一致

zouxuan 4 лет назад
Родитель
Сommit
be9e58dc92

+ 9 - 11
mec-biz/src/main/java/com/ym/mec/biz/service/impl/IndexBaseMonthDataServiceImpl.java

@@ -428,8 +428,12 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 		}
 		//当前用户是否是分部经理
 		List<Integer> userRole = employeeDao.queryUserRole(sysUser.getId());
+		Integer educationUserId = null;
+		if (!sysUser.getIsSuperAdmin() && userRole.size() == 1 && userRole.contains(SysUserRole.EDUCATIONAL_TEACHER)) {
+			educationUserId = sysUser.getId();
+		}
 		//获取关联的乐团列表
-		List<String> musicGroupIds = musicGroupDao.queryIdsByEduIdAndOrganIds(userRole.contains(4)?sysUser.getId():null,organIds);
+		List<String> musicGroupIds = musicGroupDao.queryIdsByEduIdAndOrganIds(educationUserId,organIds);
 		String configValue1 = sysConfigDao.findConfigValue("push_create_payment_calender");
 		Date date = new Date();
 		String format = DateUtil.format(date, DateUtil.DEFAULT_PATTERN);
@@ -583,18 +587,12 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 		}
 		resultMap.put("attendanceServe",flag4);
 
-//		SysUser sysUser = sysUserFeignService.queryUserInfo();
-//		if (sysUser == null) {
-//			throw new BizException("用户信息获取失败");
-//		}
-		//当前用户是否是分部经理
-//		List<Integer> userRole = employeeDao.queryUserRole(sysUser.getId());
 		//获取关联的乐团列表
-		List<String> musicGroupIds = musicGroupDao.queryIdsByEduIdAndOrganIds(userRole.contains(4)?sysUser.getId():null,organIdsStr);
-		String configValue1 = sysConfigDao.findConfigValue("push_create_payment_calender");
-		date = new Date();
-		String format = DateUtil.format(date, DateUtil.DEFAULT_PATTERN);
+		List<String> musicGroupIds = musicGroupDao.queryIdsByEduIdAndOrganIds(educationUserId,organIdsStr);
 		if(musicGroupIds.size() > 0){
+			String configValue1 = sysConfigDao.findConfigValue("push_create_payment_calender");
+			date = new Date();
+			String format = DateUtil.format(date, DateUtil.DEFAULT_PATTERN);
 			List<Long> calenderIds = musicGroupPaymentCalenderDao.queryEndIds(configValue1, format,musicGroupIds);
 			if(calenderIds.size() > 0){
 				resultMap.put("remindMatterData",true);