Browse Source

版本更新

lihui001 3 years ago
parent
commit
f9eb6bff75

+ 1 - 1
zoniot-rmcp/zoniot-rmcp-sync/src/main/java/com/zcxk/sync/base/BaseSync.java

@@ -35,7 +35,7 @@ public class BaseSync<T> {
         String tableName = jsonObject.getString("table");
         // 检查数据是否正常
         checkData(jsonArray, typeSql, tableName, syncTable);
-        Map<String, List<T>> result = new HashMap<>();
+        Map<String, List<T>> result = new HashMap<>(jsonArray.size());
         List<T> list = new ArrayList<>();
         for (int i = 0; i < jsonArray.size(); i++) {
             list.add(JSON.toJavaObject(jsonArray.getJSONObject(i), tClass));

+ 2 - 2
zoniot-rmcp/zoniot-rmcp-sync/src/main/java/com/zcxk/sync/mq/SyncOrgConsumer.java

@@ -21,7 +21,7 @@ import java.util.Map;
 /**
  * @author Andy
  * @version V1.0
- * @description: 同步小区
+ * @description: 同步org
  * @date 2021/7/28
  **/
 @Slf4j
@@ -57,7 +57,7 @@ public class SyncOrgConsumer extends BaseSync<Org> {
         } catch (Exception e) {
             log.error("同步org机构数据异常:{}", msg);
         }
-        log.info("======================同步org机构数据  end======================");
+        log.info("======================同步org机构数据  end=======================");
     }
 
     /**

+ 2 - 2
zoniot-rmcp/zoniot-rmcp-web/src/main/java/com/zcxk/rmcp/web/service/impl/DeviceServiceImpl.java

@@ -234,12 +234,12 @@ public class DeviceServiceImpl implements DeviceService{
         }
         // 总数
         int allTotal = 0;
-        // 单个设备总数
-        int deviceTotal = 0;
         DeviceStatisticsVo  statisticsVo = new DeviceStatisticsVo();
         Map<String, StatusStatisticsVo> statusMap = new HashMap<>();
         List<DeviceStatisticsVo.DeviceRatio> ratioList = new ArrayList<>();
         for (DeviceStatusVo deviceStatusVo : list) {
+            // 单个设备总数
+            int deviceTotal = 0;
             for (StatusStatisticsVo statistic : deviceStatusVo.getStatistics()) {
                 // 统计同一个状态的条数
                 totalStatus(statusMap, statistic);

+ 0 - 29
zoniot-water/zoniot-water-xxl-client/src/main/java/com/zcxk/water/xxl/mq/ReceiveClearData.java

@@ -222,33 +222,4 @@ public class ReceiveClearData {
         save(monitorDataEntity);
     }
 
-    /**
-     * 16进制转换成为string类型字符串
-     * @param
-     * @return
-     */
-    public static String hexStringToString(String s) {
-        if (s == null || s.equals("")) {
-            return null;
-        }
-        s = s.replace(" ", "");
-        byte[] baKeyword = new byte[s.length() / 2];
-        for (int i = 0; i < baKeyword.length; i++) {
-            try {
-                baKeyword[i] = (byte) (0xff & Integer.parseInt(s.substring(i * 2, i * 2 + 2), 16));
-            } catch (Exception e) {
-                e.printStackTrace();
-            }
-        }
-        try {
-            s = new String(baKeyword, "UTF-8");
-            new String();
-        } catch (Exception e1) {
-            e1.printStackTrace();
-        }
-        return s;
-    }
-    public static void main(String[] args) {
-        System.out.println(ReceiveClearData.hexStringToString("ABCD0031EA892108220200010501FE0F7710443131333B322E313B352E302031392020202020000000FFFF58521704013EAEEAF02B0D0A"));
-    }
 }