소스 검색

天气接口

523096025 2 년 전
부모
커밋
a6d3581c00
1개의 변경된 파일2개의 추가작업 그리고 6개의 파일을 삭제
  1. 2 6
      huimv-admin/src/main/java/com/huimv/admin/service/impl/EnergyGasServiceImpl.java

+ 2 - 6
huimv-admin/src/main/java/com/huimv/admin/service/impl/EnergyGasServiceImpl.java

@@ -72,19 +72,15 @@ public class EnergyGasServiceImpl extends ServiceImpl<EnergyGasMapper, EnergyGas
 
             if (ObjectUtil.isNotEmpty(energyGas)) {
                 count = count + Float.parseFloat(energyGas.getGasValue());
-            } else {
-                count = count + 0.00f;
             }
 
-            DecimalFormat df = new DecimalFormat("#.00");
-            jsonObject.put("value", df.format(count));
+//            DecimalFormat df = new DecimalFormat("#.00");
+            jsonObject.put("value",count );
             jsonObject.put("buildName", basePigpen.getBuildName());
             jsonObject.put("id", basePigpen.getId());
             jsonArray.add(jsonObject);
-
         }
 
-
         return new Result(ResultCode.SUCCESS, jsonArray);
     }