|
|
@ -44,6 +44,8 @@ public class UserService implements IUserService{ |
|
|
|
private TallFeignClient tallFeignClient; |
|
|
|
@Autowired |
|
|
|
private HealthRecordsDao healthRecordsDao; |
|
|
|
@Autowired |
|
|
|
private HealthTypeDao healthTypeDao; |
|
|
|
@Resource |
|
|
|
private MemberDao memberDao; |
|
|
|
@Resource |
|
|
@ -94,7 +96,19 @@ public class UserService implements IUserService{ |
|
|
|
|
|
|
|
//查询健康码
|
|
|
|
List<UserVo.HealthCode> healthCodeList = healthRecordsDao.getHealthQrCodeByEmployeeId(userId,startTime,endTime); |
|
|
|
|
|
|
|
if(CollectionUtil.isNotEmpty(healthCodeList)){ |
|
|
|
for(UserVo.HealthCode healthCode : healthCodeList){ |
|
|
|
healthCode.setHealthLevel(0); |
|
|
|
//获取健康状态
|
|
|
|
HealthType healthType = healthTypeDao.selectByPrimaryKey(healthCode.getHealthTypeId()); |
|
|
|
if(ObjectUtil.isNotNull(healthType)){ |
|
|
|
//如果健康状态异常,健康码为橙色
|
|
|
|
if(healthType.getQuarantine() != 0){ |
|
|
|
healthCode.setHealthLevel(1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
userInfoVo.setHealthCodeList(healthCodeList); |
|
|
|
|
|
|
|
return userInfoVo; |
|
|
|