修复对接金仓数据库中的问题

This commit is contained in:
648540858
2023-09-12 15:32:17 +08:00
parent 5b8ffd5b61
commit d05bce8f7f
5 changed files with 41 additions and 32 deletions

View File

@@ -50,8 +50,6 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
device = deviceMapper.getDeviceByDeviceId(deviceChannel.getDeviceId());
}
if ("WGS84".equals(device.getGeoCoordSys())) {
deviceChannel.setLongitudeWgs84(deviceChannel.getLongitude());
deviceChannel.setLatitudeWgs84(deviceChannel.getLatitude());
@@ -143,7 +141,7 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
}
}
}
int limitCount = 300;
int limitCount = 50;
if (addChannels.size() > 0) {
if (addChannels.size() > limitCount) {
for (int i = 0; i < addChannels.size(); i += limitCount) {
@@ -201,7 +199,7 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
deviceChannel.setUpdateTime(now);
result.add(updateGps(deviceChannel, device));
});
int limitCount = 300;
int limitCount = 50;
if (result.size() > limitCount) {
for (int i = 0; i < result.size(); i += limitCount) {
int toIndex = i + limitCount;

View File

@@ -82,7 +82,7 @@ public class PlatformChannelServiceImpl implements IPlatformChannelService {
int allCount = 0;
boolean result = false;
TransactionStatus transactionStatus = dataSourceTransactionManager.getTransaction(transactionDefinition);
int limitCount = 300;
int limitCount = 50;
if (channelReducesToAdd.size() > 0) {
if (channelReducesToAdd.size() > limitCount) {
for (int i = 0; i < channelReducesToAdd.size(); i += limitCount) {