|
@@ -249,7 +249,8 @@ public class ReportService implements IReportService { |
|
@@ -249,7 +249,8 @@ public class ReportService implements IReportService { |
|
249
|
reportDetailRepository.save(report.getRpDetailList());
|
249
|
reportDetailRepository.save(report.getRpDetailList());
|
|
250
|
reportResultRepository.save(report.getBasicResList());
|
250
|
reportResultRepository.save(report.getBasicResList());
|
|
251
|
// 保存报告地理位置。
|
251
|
// 保存报告地理位置。
|
|
252
|
- saveRpLocation2DB(report, admin);
|
252
|
+ saveRpLocation2DB(report, ampReport.getId(), admin);
|
|
|
|
253
|
+ // 健康评分
|
|
253
|
scoreService.getScore(ampReport.getId());
|
254
|
scoreService.getScore(ampReport.getId());
|
|
254
|
return ampReport.getId();
|
255
|
return ampReport.getId();
|
|
255
|
}
|
256
|
}
|
|
@@ -257,12 +258,12 @@ public class ReportService implements IReportService { |
|
@@ -257,12 +258,12 @@ public class ReportService implements IReportService { |
|
257
|
/*
|
258
|
/*
|
|
258
|
* 保存报告地理位置。
|
259
|
* 保存报告地理位置。
|
|
259
|
*/
|
260
|
*/
|
|
260
|
- private void saveRpLocation2DB(ReportData report, XklAdminEntity admin) {
|
261
|
+ private void saveRpLocation2DB(ReportData report, long reportId, XklAdminEntity admin) {
|
|
261
|
String ip = admin.getIp();
|
262
|
String ip = admin.getIp();
|
|
262
|
Location location = IPTools.getLocationWithIP(ip);
|
263
|
Location location = IPTools.getLocationWithIP(ip);
|
|
263
|
if (location == null) return;
|
264
|
if (location == null) return;
|
|
264
|
XklAmpReportLocationEntity rpLoc = new XklAmpReportLocationEntity(report.getAmpReport().getMachineNum(),
|
265
|
XklAmpReportLocationEntity rpLoc = new XklAmpReportLocationEntity(report.getAmpReport().getMachineNum(),
|
|
265
|
- admin.getId(), ip, location.getCountry(), location.getProvince(), location.getCity(), location.getDistrict(),
|
266
|
+ admin.getId(), reportId, ip, location.getCountry(), location.getProvince(), location.getCity(), location.getDistrict(),
|
|
266
|
report.getAmpReport().getCheckTime(), report.getAmpReport().getUptime());
|
267
|
report.getAmpReport().getCheckTime(), report.getAmpReport().getUptime());
|
|
267
|
xklAmpReportLocationRespository.save(rpLoc);
|
268
|
xklAmpReportLocationRespository.save(rpLoc);
|
|
268
|
}
|
269
|
}
|