Showing
2 changed files
with
27 additions
and
0 deletions
@@ -91,10 +91,12 @@ public class ReportController { | @@ -91,10 +91,12 @@ public class ReportController { | ||
91 | reportDetail.setStatus(detail.getStatus()); | 91 | reportDetail.setStatus(detail.getStatus()); |
92 | 92 | ||
93 | XklAmpReportMetaItemsEntity metaItems=Constants.itemMetaMap.get(itemId); | 93 | XklAmpReportMetaItemsEntity metaItems=Constants.itemMetaMap.get(itemId); |
94 | + if(metaItems!=null){ | ||
94 | reportDetail.setTitle(metaItems.getTitle()); | 95 | reportDetail.setTitle(metaItems.getTitle()); |
95 | reportDetail.setNormal(metaItems.getStandardLowMale()+" - "+metaItems.getStandardHighMale()); | 96 | reportDetail.setNormal(metaItems.getStandardLowMale()+" - "+metaItems.getStandardHighMale()); |
96 | reportDetail.setNormalNv(metaItems.getStandardLowFemale()+ " - "+metaItems.getStandardHighFemale()); | 97 | reportDetail.setNormalNv(metaItems.getStandardLowFemale()+ " - "+metaItems.getStandardHighFemale()); |
97 | reportDetail.setType(metaItems.getType()); | 98 | reportDetail.setType(metaItems.getType()); |
99 | + } | ||
98 | 100 | ||
99 | XklAmpReportHealthScoreEntity scoreEntity = xklAmpReportHealthScoreRespository.findByReportIdAndType(report_id,metaItems.getType()); | 101 | XklAmpReportHealthScoreEntity scoreEntity = xklAmpReportHealthScoreRespository.findByReportIdAndType(report_id,metaItems.getType()); |
100 | if(scoreEntity!=null) | 102 | if(scoreEntity!=null) |
@@ -137,6 +139,7 @@ public class ReportController { | @@ -137,6 +139,7 @@ public class ReportController { | ||
137 | 139 | ||
138 | XklAmpReportMetaItemsEntity metaItems = Constants.itemMetaMap.get(itemId); | 140 | XklAmpReportMetaItemsEntity metaItems = Constants.itemMetaMap.get(itemId); |
139 | String result=""; | 141 | String result=""; |
142 | + if(metaItems!= null){ | ||
140 | //0, normal,1, lower,2, higher | 143 | //0, normal,1, lower,2, higher |
141 | if(status == 0){ | 144 | if(status == 0){ |
142 | result = metaItems.getExplainNormal(); | 145 | result = metaItems.getExplainNormal(); |
@@ -147,6 +150,10 @@ public class ReportController { | @@ -147,6 +150,10 @@ public class ReportController { | ||
147 | }else{ | 150 | }else{ |
148 | result = "没有此status相关信息"; | 151 | result = "没有此status相关信息"; |
149 | } | 152 | } |
153 | + }else{ | ||
154 | + result = "没有此itemId相关信息"; | ||
155 | + } | ||
156 | + | ||
150 | return new ResponseEntity<>(ResultModel.ok(result), HttpStatus.OK); | 157 | return new ResponseEntity<>(ResultModel.ok(result), HttpStatus.OK); |
151 | } | 158 | } |
152 | 159 | ||
@@ -174,11 +181,13 @@ public class ReportController { | @@ -174,11 +181,13 @@ public class ReportController { | ||
174 | long reportId= report.getId(); | 181 | long reportId= report.getId(); |
175 | if(reportTime>=stimeLong&&reportTime<=etimeLong){//在时间范围内 | 182 | if(reportTime>=stimeLong&&reportTime<=etimeLong){//在时间范围内 |
176 | XklAmpReportDetailEntity reportDetail = xklAmpReportDetailRespository.findByReportIdAndItemId(reportId,itemId); | 183 | XklAmpReportDetailEntity reportDetail = xklAmpReportDetailRespository.findByReportIdAndItemId(reportId,itemId); |
184 | + if(reportDetail!=null){ | ||
177 | ReportItemGraphModel reportItemGraphModel= new ReportItemGraphModel(reportTime,reportDetail.getItemValue()); | 185 | ReportItemGraphModel reportItemGraphModel= new ReportItemGraphModel(reportTime,reportDetail.getItemValue()); |
178 | reportItemGraphModelList.add(reportItemGraphModel); | 186 | reportItemGraphModelList.add(reportItemGraphModel); |
179 | } | 187 | } |
180 | } | 188 | } |
181 | } | 189 | } |
190 | + } | ||
182 | return new ResponseEntity<>(ResultModel.ok(reportItemGraphModelList), HttpStatus.OK); | 191 | return new ResponseEntity<>(ResultModel.ok(reportItemGraphModelList), HttpStatus.OK); |
183 | } | 192 | } |
184 | 193 |
src/main/resources/application.properties
0 → 100644
1 | +server.port=8090 | ||
2 | + | ||
3 | +#server.ssl.key-store = ${user.home}/.keystore | ||
4 | +#server.ssl.key-store-password = xkl2016 | ||
5 | +#server.ssl.key-password = xkl2016 | ||
6 | + | ||
7 | +#MySQL | ||
8 | +spring.datasource.url=jdbc:mysql://localhost:3306/hanhe_test?useUnicode=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=round&autoReconnect=true | ||
9 | +spring.datasource.username=root | ||
10 | +spring.datasource.password=fyqmysql | ||
11 | + | ||
12 | +#Redis | ||
13 | +spring.redis.host=127.0.0.1 | ||
14 | +spring.redis.password=foobared | ||
15 | +#spring.redis.host=r-m5e7cedd3124afd4.redis.rds.aliyuncs.com | ||
16 | +#spring.redis.password=r-m5e7cedd3124afd4:XIkaiLURedis2016 | ||
17 | + | ||
18 | +spring.redis.port=6379 |
-
Please register or login to post a comment