Commit 7c440438 authored by chenyuling's avatar chenyuling

"数据长度不变也进行更新数据"

parent 75dcf957
Pipeline #2292 failed with stages
...@@ -251,7 +251,6 @@ public class MainActivity extends BaseActivity implements NetworkIPMonitor.OnIPC ...@@ -251,7 +251,6 @@ public class MainActivity extends BaseActivity implements NetworkIPMonitor.OnIPC
if (type ==ENTER_TYPE){ if (type ==ENTER_TYPE){
if (passEntities != null) { if (passEntities != null) {
int size = passEntities.size(); int size = passEntities.size();
if (size!=lastEnterSize){
/*//更新进出情况 /*//更新进出情况
//enterBeans = passEntities; 全局变量直接赋值会出现问题 //enterBeans = passEntities; 全局变量直接赋值会出现问题
enterBeans.clear(); enterBeans.clear();
...@@ -274,7 +273,7 @@ public class MainActivity extends BaseActivity implements NetworkIPMonitor.OnIPC ...@@ -274,7 +273,7 @@ public class MainActivity extends BaseActivity implements NetworkIPMonitor.OnIPC
//更新分组情况(是否要根据id去重) //更新分组情况(是否要根据id去重)
groupEnterHashMap = getGroupSizeHashMap(passEntities); groupEnterHashMap = getGroupSizeHashMap(passEntities);
updatePresentSize(groupEnterHashMap,groupLeaveHashMap); updatePresentSize(groupEnterHashMap,groupLeaveHashMap);
}
} }
}else if (type == LEAVE_TYPE){ }else if (type == LEAVE_TYPE){
...@@ -282,7 +281,6 @@ public class MainActivity extends BaseActivity implements NetworkIPMonitor.OnIPC ...@@ -282,7 +281,6 @@ public class MainActivity extends BaseActivity implements NetworkIPMonitor.OnIPC
if (passEntities != null) { if (passEntities != null) {
int size = passEntities.size(); int size = passEntities.size();
//进出有变化时才更新 //进出有变化时才更新
if (size!=lastLeaveSize){
/*leaveBeans.clear(); /*leaveBeans.clear();
leaveBeans.addAll(passEntities); leaveBeans.addAll(passEntities);
//更新进出情况 //更新进出情况
...@@ -305,7 +303,6 @@ public class MainActivity extends BaseActivity implements NetworkIPMonitor.OnIPC ...@@ -305,7 +303,6 @@ public class MainActivity extends BaseActivity implements NetworkIPMonitor.OnIPC
groupLeaveHashMap = getGroupSizeHashMap(passEntities); groupLeaveHashMap = getGroupSizeHashMap(passEntities);
updatePresentSize(groupEnterHashMap,groupLeaveHashMap); updatePresentSize(groupEnterHashMap,groupLeaveHashMap);
} }
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment