Browse Source

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

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