| | |
| | | if (!BaseApplication.deviceAvailable) {
|
| | | return;
|
| | | }
|
| | | if(BaseApplication.getInstance().networkNotAvailable()) {
|
| | | reloadLeftListAfterReturn(append, AttendanceDao.getInstance().reloadLeftList(searchText, pageNum, append));
|
| | | } else {
|
| | | if(BaseApplication.getInstance().networkAvailable()) {
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL + AppApi.Query.ATTENDANCE_QUERY);
|
| | | params.addBodyParameter(AttendanceQueryCondition.FieldNames.username, searchText);
|
| | | params.addBodyParameter(AttendanceQueryCondition.FieldNames.deviceCompanyId, BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | |
| | | reloadLeftListAfterReturn(append, resultBean);
|
| | | }
|
| | | });
|
| | | } else {
|
| | | reloadLeftListAfterReturn(append, AttendanceDao.getInstance().reloadLeftList(searchText, pageNum, append));
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | });
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | public void reloadAttendanceDetail(final AttendanceQueryItem item) {
|
| | | if (!BaseApplication.deviceAvailable) {
|
| | | return;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void removeLastMonthData() {
|
| | | try {
|
| | | String sql = "delete from attendance where 1=1 and time< '" + DateUtil.getPreviousMonthLastDay() + "'";
|
| | | MainActivity.getInstance().db.execSQL(sql);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | }
|
| | | }
|