From f1426e0387d0c2b5d9a4ca5a4b7c0666889ee4b2 Mon Sep 17 00:00:00 2001
From: zhongrj <123456>
Date: Fri, 26 Aug 2022 11:31:33 +0800
Subject: [PATCH] 枪支定位查询修改

---
 src/main/java/org/springblade/modules/location/service/impl/LiveLocationServiceImpl.java |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/springblade/modules/location/service/impl/LiveLocationServiceImpl.java b/src/main/java/org/springblade/modules/location/service/impl/LiveLocationServiceImpl.java
index daee3d4..84132d1 100644
--- a/src/main/java/org/springblade/modules/location/service/impl/LiveLocationServiceImpl.java
+++ b/src/main/java/org/springblade/modules/location/service/impl/LiveLocationServiceImpl.java
@@ -89,11 +89,11 @@
 				String startTime = "2020-05-25";
 				String endTime = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
 				//遍历
-				gunList.forEach(gun -> {
-					if (!StringUtils.isBlank(gun.getCardNo())) {
+				for (Gun gun : gunList) {
+					if (!StringUtils.isBlank(gun.getCardNo()) && !gun.getCardNo().equals("null")) {
 						//远程调用
 						String body = InvestigateUtil.httpGetGunPosition(gun.getCardNo(), null, startTime, endTime, null, null);
-//					System.out.println("body = " + body);
+						System.out.println("body = " + body);
 						if (null != body && !body.equals("")) {
 							JSONObject jsonObject = new JSONObject(body);
 							Object data = jsonObject.get("data");
@@ -133,7 +133,7 @@
 							}
 						}
 					}
-				});
+				}
 			}
 			return list;
 		}

--
Gitblit v1.9.3