| | |
| | | List<SurveillanceQueryItem> registerList = new ArrayList<SurveillanceQueryItem>();
|
| | | List<SurveillanceQueryItem> checkInList = new ArrayList<SurveillanceQueryItem>();
|
| | | removeDuplicate(list);
|
| | | int maxRegister = 20;
|
| | | int i1 = 0, j = 0;
|
| | | int maxCheckIn = 20;
|
| | | for (SurveillanceQueryItem item : list) {
|
| | | if (item.getRegisterOrCheckIn() == Constant.Surveillance.VISIT_REGISTER_ITEM_TYPE) {
|
| | | registerList.add(item);
|
| | | if (i1 < maxRegister) {
|
| | | registerList.add(item);
|
| | | i1++;
|
| | | }
|
| | | }
|
| | | if (item.getRegisterOrCheckIn() == Constant.Surveillance.VISIT_CHECK_IN_ITEM_TYPE) {
|
| | | checkInList.add(item);
|
| | | if (j < maxCheckIn) {
|
| | | checkInList.add(item);
|
| | | j++;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|