Browse Source

0309.1

master
zhangye 6 years ago
parent
commit
f502a7d931
  1. 2
      health/src/main/java/com/ccsens/health/bean/dto/JourneyDto.java
  2. 17
      health/src/main/java/com/ccsens/health/service/HealthService.java

2
health/src/main/java/com/ccsens/health/bean/dto/JourneyDto.java

@ -43,7 +43,7 @@ public class JourneyDto {
}
@Data
@ApiModel("查询个人信息")
@ApiModel("查询个人信息输入")
public static class SelectUser{
@ApiModelProperty("userId")
private Long userId;

17
health/src/main/java/com/ccsens/health/service/HealthService.java

@ -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;
}

Loading…
Cancel
Save