From f4186e28418fac9eb27a4ae40b201129692d8f9a Mon Sep 17 00:00:00 2001 From: liuchengqian Date: Thu, 2 Jun 2022 22:26:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B1=B1=E4=B8=9C=E4=B8=B4=E6=97=B6=E7=81=AB?= =?UTF-8?q?=E7=82=B9=E8=A1=A8=E5=88=B0=E5=85=A8=E5=9B=BD=E7=81=AB=E7=82=B9?= =?UTF-8?q?=E8=A1=A8=E7=9A=84=E6=96=B0=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xkrs/service/impl/FirePointServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java index 28c6730..deb51c6 100644 --- a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java @@ -23,6 +23,7 @@ import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import javax.transaction.Transactional; import java.io.IOException; +import java.text.DecimalFormat; import java.time.LocalDate; import java.time.LocalDateTime; import java.util.*; @@ -334,7 +335,11 @@ public class FirePointServiceImpl implements FirePointService { } } if (weixinIdList.size() > 0) { - String content = "【星科瑞升】您注册的区域卫星监测到疑似火点," + firePointEntity.getFirePointAddress() + ",\n请登录系统查看"; + java.text.DecimalFormat decimalFormat = new DecimalFormat("#.000000"); + String formatLongitude = decimalFormat.format(firePointEntity.getLongitude()); + String formatLatitude = decimalFormat.format(firePointEntity.getLatitude()); + String countyName = firePointEntity.getCountyName(); + String content = firePointEntity.getSatelliteType() + "发现1个火点。\nlongitude:" + formatLongitude + ";\nlatitude:" + formatLatitude + ";\ncountyName:" + countyName; for (String weixinId : weixinIdList) { try { WDWxSendMsgUtil.sendMsg(weixinId, content, 0);