From 1f5947ccb5b02817dbe5aaae943c0a7fcfc2cd62 Mon Sep 17 00:00:00 2001 From: jiazx0107@163.com <jiazx0107@163.com> Date: 星期四, 09 十一月 2023 00:54:24 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/igds-api-gateway' into igds-api-gateway --- src/main/java/com/fzzy/gateway/service/GatewayDeviceService.java | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/fzzy/gateway/service/GatewayDeviceService.java b/src/main/java/com/fzzy/gateway/service/GatewayDeviceService.java index d571fc3..55c6cf2 100644 --- a/src/main/java/com/fzzy/gateway/service/GatewayDeviceService.java +++ b/src/main/java/com/fzzy/gateway/service/GatewayDeviceService.java @@ -24,6 +24,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.math.RandomUtils; import org.apache.commons.lang.time.DateFormatUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -32,10 +33,7 @@ import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; @Slf4j @@ -126,9 +124,9 @@ * @return */ @Expose - public String ajaxTestWeight(GateWayTestParam parameter) { - double weigh = (double) parameter.getWeight(); - //double weigh = Double.parseDouble("3500.0"); + public String ajaxTestWeight() { + //double weigh = (double) parameter.getWeight(); + double weigh = Math.random() * (35000 - 16000 + 1) + 16000; List<GatewayDevice> devices = listAll(); if (devices == null || devices.size() <= 0) { return "娌℃湁璁惧"; @@ -203,7 +201,7 @@ packet.setHeaders(header); packet.setMessageType(ScConstant.MESSAGE_TYPE_REPORT_PROPERTY); packet.setDeviceId(device.getDeviceId()); - + packet.setMessageId(System.currentTimeMillis() + ""); //璁剧疆淇℃伅涓讳綋 LprData lpr = new LprData(); lpr.setDeviceId(device.getDeviceId()); -- Gitblit v1.9.3