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