Authored by fangyeqing

Fix:fix bugs

... ... @@ -91,10 +91,12 @@ public class ReportController {
reportDetail.setStatus(detail.getStatus());
XklAmpReportMetaItemsEntity metaItems=Constants.itemMetaMap.get(itemId);
if(metaItems!=null){
reportDetail.setTitle(metaItems.getTitle());
reportDetail.setNormal(metaItems.getStandardLowMale()+" - "+metaItems.getStandardHighMale());
reportDetail.setNormalNv(metaItems.getStandardLowFemale()+ " - "+metaItems.getStandardHighFemale());
reportDetail.setType(metaItems.getType());
}
XklAmpReportHealthScoreEntity scoreEntity = xklAmpReportHealthScoreRespository.findByReportIdAndType(report_id,metaItems.getType());
if(scoreEntity!=null)
... ... @@ -137,6 +139,7 @@ public class ReportController {
XklAmpReportMetaItemsEntity metaItems = Constants.itemMetaMap.get(itemId);
String result="";
if(metaItems!= null){
//0, normal,1, lower,2, higher
if(status == 0){
result = metaItems.getExplainNormal();
... ... @@ -147,6 +150,10 @@ public class ReportController {
}else{
result = "没有此status相关信息";
}
}else{
result = "没有此itemId相关信息";
}
return new ResponseEntity<>(ResultModel.ok(result), HttpStatus.OK);
}
... ... @@ -174,11 +181,13 @@ public class ReportController {
long reportId= report.getId();
if(reportTime>=stimeLong&&reportTime<=etimeLong){//在时间范围内
XklAmpReportDetailEntity reportDetail = xklAmpReportDetailRespository.findByReportIdAndItemId(reportId,itemId);
if(reportDetail!=null){
ReportItemGraphModel reportItemGraphModel= new ReportItemGraphModel(reportTime,reportDetail.getItemValue());
reportItemGraphModelList.add(reportItemGraphModel);
}
}
}
}
return new ResponseEntity<>(ResultModel.ok(reportItemGraphModelList), HttpStatus.OK);
}
... ...
server.port=8090
#server.ssl.key-store = ${user.home}/.keystore
#server.ssl.key-store-password = xkl2016
#server.ssl.key-password = xkl2016
#MySQL
spring.datasource.url=jdbc:mysql://localhost:3306/hanhe_test?useUnicode=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=round&autoReconnect=true
spring.datasource.username=root
spring.datasource.password=fyqmysql
#Redis
spring.redis.host=127.0.0.1
spring.redis.password=foobared
#spring.redis.host=r-m5e7cedd3124afd4.redis.rds.aliyuncs.com
#spring.redis.password=r-m5e7cedd3124afd4:XIkaiLURedis2016
spring.redis.port=6379
\ No newline at end of file
... ...