Browse Source

Merge remote-tracking branch 'origin/20200908' into 20200908

lin 4 years ago
parent
commit
f5ed9a1765

+ 4 - 1
smart-city-platform/src/main/java/com/bz/smart_city/service/sync/SyncDataServiceImpl.java

@@ -14,6 +14,7 @@ import com.bz.smart_city.entity.Device;
 import com.bz.smart_city.entity.MeterReadRecord;
 import com.bz.smart_city.service.SyncDataService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import java.util.ArrayList;
@@ -30,6 +31,8 @@ public class SyncDataServiceImpl implements SyncDataService {
     private MeterReadRecordMapper meterReadRecordMapper;
     @Autowired
     private CommunityMapper communityMapper;
+    @Value("${sync.data.limit}")
+    private Integer syncDataLimit;
     @Override
     public ListObjectWrapper<ClearDataDto> queryClearingDataList(String yyyymm, List<String> fileNos, String customerNo) {
         Map<String, Object> deviceInfo = getDeviceInfo(fileNos, customerNo);
@@ -69,7 +72,7 @@ public class SyncDataServiceImpl implements SyncDataService {
     }
     private Map<String,Object>getDeviceInfo(List<String> fileNoList, String customerNo){
 
-        if(fileNoList.size()>30){
+        if(fileNoList.size()>syncDataLimit){
             return null;
         }
         List<Device> byFileNo = deviceMapper.findByFileNo(fileNoList, customerNo);