| | |
| | | import cn.com.basic.face.discern.common.CommonVariables;
|
| | | import cn.com.basic.face.discern.entity.Dictionary;
|
| | |
|
| | | import static cn.com.basic.face.discern.entity.Register.FieldNames.company;
|
| | |
|
| | | /**
|
| | | * 数据字典Dao
|
| | | */
|
| | |
| | | dic.setOrderBy(c.getString(c.getColumnIndex("order_by")));
|
| | | dic.setPid(c.getString(c.getColumnIndex("pid")));
|
| | | dic.setRemark(c.getString(c.getColumnIndex("remark")));
|
| | | dic.setIsValid(c.getString(c.getColumnIndex("is_valid")));
|
| | | dic.setCreateTime(c.getString(c.getColumnIndex("create_time")));
|
| | | result.add(dic);
|
| | | }
|
| | | return result;
|
| | | }
|
| | |
|
| | | //删除已经上传到服务器的数据
|
| | | public void delDictionary(String deviceCompanyId){
|
| | | String sql="delete from dictionary where is_synchron='N' and device_company_id="+Integer.parseInt(deviceCompanyId);
|
| | | public void delDictionary(){
|
| | | String sql="delete from dictionary where is_synchron='N'";
|
| | | MainActivity.getInstance().db.execSQL(sql);
|
| | |
|
| | | }
|
| | |
|
| | | //获取未同步数据总数
|
| | | public int getSynDataCount(){
|
| | | String sql="select count(*) from dictionary where is_synchron='N' ";
|
| | | Cursor c =MainActivity.getInstance().db.rawQuery(sql,new String[]{});
|
| | | c.moveToFirst();
|
| | | return c.getInt(0);
|
| | | }
|
| | |
|
| | | }
|
| | |
|