|
|
@ -20,6 +20,7 @@ import com.ccsens.util.WebConstant; |
|
|
|
import com.ccsens.util.bean.dto.QueryDto; |
|
|
|
import com.ccsens.util.exception.BaseException; |
|
|
|
import com.ccsens.util.wx.WxXcxUtil; |
|
|
|
import io.micrometer.shaded.org.pcollections.PCollection; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
@ -76,7 +77,7 @@ public class HealthService implements IHealthService{ |
|
|
|
color.r = "243"; |
|
|
|
color.g = "139"; |
|
|
|
color.b = "0"; |
|
|
|
healthInfoVo.setHealthLevel(0); |
|
|
|
healthInfoVo.setHealthLevel(1); |
|
|
|
} |
|
|
|
healthInfoVo.setHealthTypeName(healthType.getName()); |
|
|
|
} |
|
|
@ -122,6 +123,20 @@ public class HealthService implements IHealthService{ |
|
|
|
// Employee employee = userService.getEmployeeByUserId(Long.valueOf(userId));
|
|
|
|
//3、查询该成员符合时间的记录
|
|
|
|
List<HealthVo.HealthInfo> healthInfoList = healthRecordsDao.selectHealthInfoByDate(Long.valueOf(userId),startTime,endTime); |
|
|
|
if(CollectionUtil.isNotEmpty(healthInfoList)){ |
|
|
|
for(HealthVo.HealthInfo healthInfo : healthInfoList){ |
|
|
|
healthInfo.setHealthLevel(0); |
|
|
|
//获取健康状态
|
|
|
|
HealthType healthType = healthTypeDao.selectByPrimaryKey(healthInfo.getHealthTypeId()); |
|
|
|
if(ObjectUtil.isNotNull(healthType)){ |
|
|
|
//如果健康状态异常,健康码为橙色
|
|
|
|
if(healthType.getQuarantine() != 0){ |
|
|
|
healthInfo.setHealthLevel(1); |
|
|
|
} |
|
|
|
healthInfo.setHealthTypeName(healthType.getName()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//4、返回
|
|
|
|
return healthInfoList; |
|
|
|
} |
|
|
|