liuyongxin 1 tháng trước cách đây
mục cha
commit
867dc60621

+ 4 - 3
cloud-oil/cloud-oil-biz/src/main/java/com/lutao/cloud/oil/service/impl/BusinessPerceptionMonitorAlarmServiceImpl.java

@@ -637,9 +637,10 @@ public class BusinessPerceptionMonitorAlarmServiceImpl implements IBusinessPerce
             size = 1;
         }
 
-        tagAlarmQoqVO.setTemperatureAlarmRatio(tagAlarmQoqVO.getTemperatureAlarmNumber() / (double) size * 100 + "%");
-        tagAlarmQoqVO.setPressureAlarmRatio(tagAlarmQoqVO.getPressureAlarmNumber() / (double) size * 100 + "%");
-        tagAlarmQoqVO.setLiquidLevelAlarmRatio(tagAlarmQoqVO.getLiquidLevelAlarmNumber() / (double) size * 100 + "%");
+        tagAlarmQoqVO.setTemperatureAlarmRatio(String.format("%.2f%%", (tagAlarmQoqVO.getTemperatureAlarmNumber() / (double) size * 100)));
+        tagAlarmQoqVO.setPressureAlarmRatio(String.format("%.2f%%", (tagAlarmQoqVO.getPressureAlarmNumber() / (double) size * 100)));
+        tagAlarmQoqVO.setLiquidLevelAlarmRatio(String.format("%.2f%%", (tagAlarmQoqVO.getLiquidLevelAlarmNumber() / (double) size * 100)));
+
 
 
         return MessageInfo.ok(tagAlarmQoqVO);

+ 2 - 1
cloud-oil/cloud-oil-biz/src/main/java/com/lutao/cloud/oil/service/impl/BusinessPersonnelDynamicsServiceImpl.java

@@ -184,13 +184,14 @@ public class BusinessPersonnelDynamicsServiceImpl implements IBusinessPersonnelD
         List<String> personOutInfoPlatformListToday = platformPersonTimeInfoMapper.getPersonOutInfoPlatformListToday();
         Map<String, Integer> personOutInfoMap = new HashMap<>();
         for (String code : personOutInfoPlatformListToday) {
-            personOutInfoMap.put(code, personOutInfoMap.getOrDefault(code, 0));
+            personOutInfoMap.put(code, personOutInfoMap.getOrDefault(code, 0)+1);
         }
         for (PersonPlatformRankVO record : personPlatformRankPage.getRecords()) {
             record.setLoginNumber(personInInfoMap.getOrDefault(record.getPlatformCode(), 0));
             record.setLogoutNumber(personOutInfoMap.getOrDefault(record.getPlatformCode(), 0));
         }
 
+
         return MessageInfo.ok(personPlatformRankPage);
     }