diff --git a/app/src/main/java/com/casic/app/smartwell/greendao/NoticeLocaleBeanDao.java b/app/src/main/java/com/casic/app/smartwell/greendao/NoticeLocaleBeanDao.java index e608096..fe1c844 100644 --- a/app/src/main/java/com/casic/app/smartwell/greendao/NoticeLocaleBeanDao.java +++ b/app/src/main/java/com/casic/app/smartwell/greendao/NoticeLocaleBeanDao.java @@ -12,9 +12,10 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. -/** + +/** * DAO for table "NOTICE_LOCALE_BEAN". -*/ + */ public class NoticeLocaleBeanDao extends AbstractDao { public static final String TABLENAME = "NOTICE_LOCALE_BEAN"; @@ -42,14 +43,16 @@ public NoticeLocaleBeanDao(DaoConfig config) { super(config); } - + public NoticeLocaleBeanDao(DaoConfig config, DaoSession daoSession) { super(config, daoSession); } - /** Creates the underlying database table. */ + /** + * Creates the underlying database table. + */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists? "IF NOT EXISTS ": ""; + String constraint = ifNotExists ? "IF NOT EXISTS " : ""; db.execSQL("CREATE TABLE " + constraint + "\"NOTICE_LOCALE_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"MESSAGE_ID\" TEXT UNIQUE ," + // 1: messageId @@ -65,7 +68,9 @@ "\"NOTICE_TIME\" TEXT);"); // 11: noticeTime } - /** Drops the underlying database table. */ + /** + * Drops the underlying database table. + */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"NOTICE_LOCALE_BEAN\""; db.execSQL(sql); @@ -74,62 +79,62 @@ @Override protected final void bindValues(DatabaseStatement stmt, NoticeLocaleBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String messageId = entity.getMessageId(); if (messageId != null) { stmt.bindString(2, messageId); } - + String appid = entity.getAppid(); if (appid != null) { stmt.bindString(3, appid); } - + String clientId = entity.getClientId(); if (clientId != null) { stmt.bindString(4, clientId); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(5, taskId); } - + String userId = entity.getUserId(); if (userId != null) { stmt.bindString(6, userId); } - + String title = entity.getTitle(); if (title != null) { stmt.bindString(7, title); } - + String content = entity.getContent(); if (content != null) { stmt.bindString(8, content); } - + String deviceCode = entity.getDeviceCode(); if (deviceCode != null) { stmt.bindString(9, deviceCode); } - + String jobId = entity.getJobId(); if (jobId != null) { stmt.bindString(10, jobId); } - + String isRead = entity.getIsRead(); if (isRead != null) { stmt.bindString(11, isRead); } - + String noticeTime = entity.getNoticeTime(); if (noticeTime != null) { stmt.bindString(12, noticeTime); @@ -139,62 +144,62 @@ @Override protected final void bindValues(SQLiteStatement stmt, NoticeLocaleBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String messageId = entity.getMessageId(); if (messageId != null) { stmt.bindString(2, messageId); } - + String appid = entity.getAppid(); if (appid != null) { stmt.bindString(3, appid); } - + String clientId = entity.getClientId(); if (clientId != null) { stmt.bindString(4, clientId); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(5, taskId); } - + String userId = entity.getUserId(); if (userId != null) { stmt.bindString(6, userId); } - + String title = entity.getTitle(); if (title != null) { stmt.bindString(7, title); } - + String content = entity.getContent(); if (content != null) { stmt.bindString(8, content); } - + String deviceCode = entity.getDeviceCode(); if (deviceCode != null) { stmt.bindString(9, deviceCode); } - + String jobId = entity.getJobId(); if (jobId != null) { stmt.bindString(10, jobId); } - + String isRead = entity.getIsRead(); if (isRead != null) { stmt.bindString(11, isRead); } - + String noticeTime = entity.getNoticeTime(); if (noticeTime != null) { stmt.bindString(12, noticeTime); @@ -204,27 +209,27 @@ @Override public Long readKey(Cursor cursor, int offset) { return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0); - } + } @Override public NoticeLocaleBean readEntity(Cursor cursor, int offset) { NoticeLocaleBean entity = new NoticeLocaleBean( // - cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // messageId - cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // appid - cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // clientId - cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskId - cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // userId - cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // title - cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // content - cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // deviceCode - cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // jobId - cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // isRead - cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11) // noticeTime + cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id + cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // messageId + cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // appid + cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // clientId + cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskId + cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // userId + cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // title + cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // content + cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // deviceCode + cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // jobId + cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // isRead + cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11) // noticeTime ); return entity; } - + @Override public void readEntity(Cursor cursor, NoticeLocaleBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -239,17 +244,17 @@ entity.setJobId(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9)); entity.setIsRead(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10)); entity.setNoticeTime(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11)); - } - + } + @Override protected final Long updateKeyAfterInsert(NoticeLocaleBean entity, long rowId) { entity.setId(rowId); return rowId; } - + @Override public Long getKey(NoticeLocaleBean entity) { - if(entity != null) { + if (entity != null) { return entity.getId(); } else { return null; @@ -265,5 +270,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/app/smartwell/greendao/NoticeLocaleBeanDao.java b/app/src/main/java/com/casic/app/smartwell/greendao/NoticeLocaleBeanDao.java index e608096..fe1c844 100644 --- a/app/src/main/java/com/casic/app/smartwell/greendao/NoticeLocaleBeanDao.java +++ b/app/src/main/java/com/casic/app/smartwell/greendao/NoticeLocaleBeanDao.java @@ -12,9 +12,10 @@ import org.greenrobot.greendao.internal.DaoConfig; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. -/** + +/** * DAO for table "NOTICE_LOCALE_BEAN". -*/ + */ public class NoticeLocaleBeanDao extends AbstractDao { public static final String TABLENAME = "NOTICE_LOCALE_BEAN"; @@ -42,14 +43,16 @@ public NoticeLocaleBeanDao(DaoConfig config) { super(config); } - + public NoticeLocaleBeanDao(DaoConfig config, DaoSession daoSession) { super(config, daoSession); } - /** Creates the underlying database table. */ + /** + * Creates the underlying database table. + */ public static void createTable(Database db, boolean ifNotExists) { - String constraint = ifNotExists? "IF NOT EXISTS ": ""; + String constraint = ifNotExists ? "IF NOT EXISTS " : ""; db.execSQL("CREATE TABLE " + constraint + "\"NOTICE_LOCALE_BEAN\" (" + // "\"_id\" INTEGER PRIMARY KEY AUTOINCREMENT ," + // 0: id "\"MESSAGE_ID\" TEXT UNIQUE ," + // 1: messageId @@ -65,7 +68,9 @@ "\"NOTICE_TIME\" TEXT);"); // 11: noticeTime } - /** Drops the underlying database table. */ + /** + * Drops the underlying database table. + */ public static void dropTable(Database db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "\"NOTICE_LOCALE_BEAN\""; db.execSQL(sql); @@ -74,62 +79,62 @@ @Override protected final void bindValues(DatabaseStatement stmt, NoticeLocaleBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String messageId = entity.getMessageId(); if (messageId != null) { stmt.bindString(2, messageId); } - + String appid = entity.getAppid(); if (appid != null) { stmt.bindString(3, appid); } - + String clientId = entity.getClientId(); if (clientId != null) { stmt.bindString(4, clientId); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(5, taskId); } - + String userId = entity.getUserId(); if (userId != null) { stmt.bindString(6, userId); } - + String title = entity.getTitle(); if (title != null) { stmt.bindString(7, title); } - + String content = entity.getContent(); if (content != null) { stmt.bindString(8, content); } - + String deviceCode = entity.getDeviceCode(); if (deviceCode != null) { stmt.bindString(9, deviceCode); } - + String jobId = entity.getJobId(); if (jobId != null) { stmt.bindString(10, jobId); } - + String isRead = entity.getIsRead(); if (isRead != null) { stmt.bindString(11, isRead); } - + String noticeTime = entity.getNoticeTime(); if (noticeTime != null) { stmt.bindString(12, noticeTime); @@ -139,62 +144,62 @@ @Override protected final void bindValues(SQLiteStatement stmt, NoticeLocaleBean entity) { stmt.clearBindings(); - + Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } - + String messageId = entity.getMessageId(); if (messageId != null) { stmt.bindString(2, messageId); } - + String appid = entity.getAppid(); if (appid != null) { stmt.bindString(3, appid); } - + String clientId = entity.getClientId(); if (clientId != null) { stmt.bindString(4, clientId); } - + String taskId = entity.getTaskId(); if (taskId != null) { stmt.bindString(5, taskId); } - + String userId = entity.getUserId(); if (userId != null) { stmt.bindString(6, userId); } - + String title = entity.getTitle(); if (title != null) { stmt.bindString(7, title); } - + String content = entity.getContent(); if (content != null) { stmt.bindString(8, content); } - + String deviceCode = entity.getDeviceCode(); if (deviceCode != null) { stmt.bindString(9, deviceCode); } - + String jobId = entity.getJobId(); if (jobId != null) { stmt.bindString(10, jobId); } - + String isRead = entity.getIsRead(); if (isRead != null) { stmt.bindString(11, isRead); } - + String noticeTime = entity.getNoticeTime(); if (noticeTime != null) { stmt.bindString(12, noticeTime); @@ -204,27 +209,27 @@ @Override public Long readKey(Cursor cursor, int offset) { return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0); - } + } @Override public NoticeLocaleBean readEntity(Cursor cursor, int offset) { NoticeLocaleBean entity = new NoticeLocaleBean( // - cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id - cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // messageId - cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // appid - cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // clientId - cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskId - cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // userId - cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // title - cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // content - cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // deviceCode - cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // jobId - cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // isRead - cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11) // noticeTime + cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id + cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1), // messageId + cursor.isNull(offset + 2) ? null : cursor.getString(offset + 2), // appid + cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // clientId + cursor.isNull(offset + 4) ? null : cursor.getString(offset + 4), // taskId + cursor.isNull(offset + 5) ? null : cursor.getString(offset + 5), // userId + cursor.isNull(offset + 6) ? null : cursor.getString(offset + 6), // title + cursor.isNull(offset + 7) ? null : cursor.getString(offset + 7), // content + cursor.isNull(offset + 8) ? null : cursor.getString(offset + 8), // deviceCode + cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9), // jobId + cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10), // isRead + cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11) // noticeTime ); return entity; } - + @Override public void readEntity(Cursor cursor, NoticeLocaleBean entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); @@ -239,17 +244,17 @@ entity.setJobId(cursor.isNull(offset + 9) ? null : cursor.getString(offset + 9)); entity.setIsRead(cursor.isNull(offset + 10) ? null : cursor.getString(offset + 10)); entity.setNoticeTime(cursor.isNull(offset + 11) ? null : cursor.getString(offset + 11)); - } - + } + @Override protected final Long updateKeyAfterInsert(NoticeLocaleBean entity, long rowId) { entity.setId(rowId); return rowId; } - + @Override public Long getKey(NoticeLocaleBean entity) { - if(entity != null) { + if (entity != null) { return entity.getId(); } else { return null; @@ -265,5 +270,5 @@ protected final boolean isEntityUpdateable() { return true; } - + } diff --git a/app/src/main/java/com/casic/app/smartwell/view/SearchResultActivity.kt b/app/src/main/java/com/casic/app/smartwell/view/SearchResultActivity.kt index 16817af..c0c442a 100644 --- a/app/src/main/java/com/casic/app/smartwell/view/SearchResultActivity.kt +++ b/app/src/main/java/com/casic/app/smartwell/view/SearchResultActivity.kt @@ -183,10 +183,26 @@ "工单编号异常,无法查看详情".show(context) return } - if (dataBeans[position].jobStatus == "0") { - navigatePageTo(jobId) - } else { - navigatePageTo(jobId) + when (dataBeans[position].jobStatus) { + "0" -> { + //待处理 + navigatePageTo(jobId) + } + "1" -> { + //待确认 + navigatePageTo(jobId) + } + "2" -> { + //处理中 + navigatePageTo(jobId) + } + "3" -> { + //已完成 + navigatePageTo(jobId) + } + else -> { + "工单无效,无法查看工单详情".show(context) + } } }