Explorar o código

遵义新区同步取消修改限制 PengDi@2021/5/24

pengdi@zoniot.com %!s(int64=3) %!d(string=hai) anos
pai
achega
f52087ef1d

+ 6 - 2
smart-city-platform/src/main/java/com/bz/smart_city/service/impl/GeneralRabbitSyncService.java

@@ -100,8 +100,12 @@ public class GeneralRabbitSyncService {
                         mpd.setSyncData(meterLastReadRecord.getReadData());
                         mpd.setGap(new BigDecimal(0));
                     } else {
+                        mpd.setRealData(record.getReadData());
+                        mpd.setRealDataDate(record.getReadTime());
+                        mpd.setSyncData(record.getReadData());
+                        mpd.setGap(new BigDecimal(0));
                         // 有抄表数据,则判断与上日推送数据是否存在-3内的波动差
-                        MeterPushData pushData = meterPushDataMapper.selectByPrimaryKey(device.getId(), yesterday);
+                        /*MeterPushData pushData = meterPushDataMapper.selectByPrimaryKey(device.getId(), yesterday);
                         // 若不存在推送数据,则直接推送今日抄表数据
                         if (pushData == null) {
                             mpd.setRealData(record.getReadData());
@@ -132,7 +136,7 @@ public class GeneralRabbitSyncService {
                                     mpd.setGap(gap);
                                 }
                             }
-                        }
+                        }*/
                     }
                     // 将推送记录进行存储,并将数据进行推送
                     meterPushDataMapper.insert(mpd);