| | |
| | |
|
| | | import java.text.SimpleDateFormat;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import cn.com.basic.face.base.BaseApplication;
|
| | |
| | | try {
|
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL +AppApi.Query.ATTENDANCE_DETAIL_QUERY);
|
| | | //params.addBodyParameter(AttendanceDetailQueryCondition.FieldNames.time, sdf.format(sdf.parse(item.getTime())));
|
| | | params.addBodyParameter(AttendanceDetailQueryCondition.FieldNames.time, sdf.format(new Date()));
|
| | | params.addBodyParameter(AttendanceDetailQueryCondition.FieldNames.registerId, item.getRegisterId());
|
| | | params.addBodyParameter(AttendanceDetailQueryCondition.FieldNames.deviceCompanyId, BaseApplication.getInstance().getAndroidDevice().getCompanyId());
|
| | | params.addBodyParameter(CommonVariables.Page.PAGE_SIZE, "20");
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void removeLastMonthData() {
|
| | | public void removeBeforeToday() {
|
| | | try {
|
| | | String sql = "delete from attendance where 1=1 and time< '" + DateUtil.getPreviousMonthLastDay() + "'";
|
| | | String sql = "delete from attendance where 1=1 and time< '" + DateUtil.getYesterday() + "'";
|
| | | MainActivity.getInstance().db.execSQL(sql);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|