diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 61a9130..fb7f4a8 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 455fa7b..20b78c9 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/app/release/app-release.apk b/app/release/oa-1.0.4.apk similarity index 74% rename from app/release/app-release.apk rename to app/release/oa-1.0.4.apk index e401947..4bedd61 100644 Binary files a/app/release/app-release.apk and b/app/release/oa-1.0.4.apk differ diff --git a/app/release/output-metadata.json b/app/release/output-metadata.json index 5e710af..c49f081 100644 --- a/app/release/output-metadata.json +++ b/app/release/output-metadata.json @@ -10,8 +10,8 @@ { "type": "SINGLE", "filters": [], - "versionCode": 9, - "versionName": "1.0.8", + "versionCode": 4, + "versionName": "1.0.4", "outputFile": "app-release.apk" } ] diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a60b6e3..f1b056d 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,7 +1,5 @@ + android:usesCleartextTraffic="true"> - oasystem + 综合办公系统 \ No newline at end of file diff --git a/baselib/schemas/com.tenlionsoft.baselib.core.db.AppDatabase/1.json b/baselib/schemas/com.tenlionsoft.baselib.core.db.AppDatabase/1.json index 23a7396..1356c33 100644 --- a/baselib/schemas/com.tenlionsoft.baselib.core.db.AppDatabase/1.json +++ b/baselib/schemas/com.tenlionsoft.baselib.core.db.AppDatabase/1.json @@ -2,11 +2,11 @@ "formatVersion": 1, "database": { "version": 1, - "identityHash": "c9030535cf5745092fdb10230bdb92b9", + "identityHash": "bd55472656a46bebcbba97c2e18ecd4e", "entities": [ { - "tableName": "food_canteen", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `uid` TEXT NOT NULL, `canteen_name` TEXT, `canteen_open` TEXT, `canteen_remark` TEXT, `sync_number` INTEGER NOT NULL, `gmt_create` TEXT, `modifier` TEXT, `gmt_modifier` TEXT, `is_delete` TEXT, PRIMARY KEY(`id`))", + "tableName": "db_dept", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `departmentAddress` TEXT, `departmentArea1Code` TEXT, `departmentArea1Id` TEXT, `departmentArea1Name` TEXT, `departmentArea2Code` TEXT, `departmentArea2Id` TEXT, `departmentArea2Name` TEXT, `departmentArea3Code` TEXT, `departmentArea3Id` TEXT, `departmentArea3Name` TEXT, `departmentArea4Code` TEXT, `departmentArea4Id` TEXT, `departmentArea4Name` TEXT, `departmentArea5Code` TEXT, `departmentArea5Id` TEXT, `departmentArea5Name` TEXT, `departmentCode` TEXT, `departmentDuty` TEXT, `departmentFax` TEXT, `departmentId` TEXT, `departmentIntId` INTEGER NOT NULL, `departmentLatitude` TEXT, `departmentLogo` INTEGER NOT NULL, `departmentLogoHover` INTEGER NOT NULL, `departmentLongitude` TEXT, `departmentMaster` TEXT, `departmentMasterName` TEXT, `departmentName` TEXT, `departmentNameEn` TEXT, `departmentNameOther` TEXT, `departmentNo` TEXT, `departmentOrder` TEXT, `departmentParentId` TEXT, `departmentParentName` TEXT, `departmentState` INTEGER NOT NULL, `departmentSummary` TEXT, `departmentTel` TEXT, `departmentType` INTEGER NOT NULL)", "fields": [ { "fieldPath": "id", @@ -15,72 +15,246 @@ "notNull": true }, { - "fieldPath": "uid", - "columnName": "uid", - "affinity": "TEXT", - "notNull": true - }, - { - "fieldPath": "canteenName", - "columnName": "canteen_name", + "fieldPath": "departmentAddress", + "columnName": "departmentAddress", "affinity": "TEXT", "notNull": false }, { - "fieldPath": "canteenOpen", - "columnName": "canteen_open", + "fieldPath": "departmentArea1Code", + "columnName": "departmentArea1Code", "affinity": "TEXT", "notNull": false }, { - "fieldPath": "canteenRemark", - "columnName": "canteen_remark", + "fieldPath": "departmentArea1Id", + "columnName": "departmentArea1Id", "affinity": "TEXT", "notNull": false }, { - "fieldPath": "syncNumber", - "columnName": "sync_number", + "fieldPath": "departmentArea1Name", + "columnName": "departmentArea1Name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentArea2Code", + "columnName": "departmentArea2Code", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentArea2Id", + "columnName": "departmentArea2Id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentArea2Name", + "columnName": "departmentArea2Name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentArea3Code", + "columnName": "departmentArea3Code", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentArea3Id", + "columnName": "departmentArea3Id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentArea3Name", + "columnName": "departmentArea3Name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentArea4Code", + "columnName": "departmentArea4Code", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentArea4Id", + "columnName": "departmentArea4Id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentArea4Name", + "columnName": "departmentArea4Name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentArea5Code", + "columnName": "departmentArea5Code", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentArea5Id", + "columnName": "departmentArea5Id", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentArea5Name", + "columnName": "departmentArea5Name", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentCode", + "columnName": "departmentCode", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentDuty", + "columnName": "departmentDuty", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentFax", + "columnName": "departmentFax", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentId", + "columnName": "departmentId", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentIntId", + "columnName": "departmentIntId", "affinity": "INTEGER", "notNull": true }, { - "fieldPath": "gmtCreate", - "columnName": "gmt_create", + "fieldPath": "departmentLatitude", + "columnName": "departmentLatitude", "affinity": "TEXT", "notNull": false }, { - "fieldPath": "modifier", - "columnName": "modifier", + "fieldPath": "departmentLogo", + "columnName": "departmentLogo", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "departmentLogoHover", + "columnName": "departmentLogoHover", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "departmentLongitude", + "columnName": "departmentLongitude", "affinity": "TEXT", "notNull": false }, { - "fieldPath": "gmtModifier", - "columnName": "gmt_modifier", + "fieldPath": "departmentMaster", + "columnName": "departmentMaster", "affinity": "TEXT", "notNull": false }, { - "fieldPath": "isDelete", - "columnName": "is_delete", + "fieldPath": "departmentMasterName", + "columnName": "departmentMasterName", "affinity": "TEXT", "notNull": false + }, + { + "fieldPath": "departmentName", + "columnName": "departmentName", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentNameEn", + "columnName": "departmentNameEn", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentNameOther", + "columnName": "departmentNameOther", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentNo", + "columnName": "departmentNo", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentOrder", + "columnName": "departmentOrder", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentParentId", + "columnName": "departmentParentId", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentParentName", + "columnName": "departmentParentName", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentState", + "columnName": "departmentState", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "departmentSummary", + "columnName": "departmentSummary", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentTel", + "columnName": "departmentTel", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "departmentType", + "columnName": "departmentType", + "affinity": "INTEGER", + "notNull": true } ], "primaryKey": { "columnNames": [ "id" ], - "autoGenerate": false + "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { - "tableName": "food_food", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `uid` TEXT, `food_name` TEXT, `food_photo` TEXT, `food_price` INTEGER NOT NULL, `food_flavor` TEXT, `food_type` TEXT, `food_unit` TEXT, `food_weight` TEXT, `food_remark` TEXT, `canteen_id` TEXT, `sync_number` INTEGER NOT NULL, `creator` TEXT, `gmt_create` TEXT, `modifier` TEXT, `gmt_modified` TEXT, `is_delete` TEXT, PRIMARY KEY(`id`))", + "tableName": "db_user", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `pinyin` TEXT, `departmentId` TEXT, `departmentName` TEXT, `loginType` INTEGER NOT NULL, `userAvatar` TEXT, `userEmail` TEXT, `userId` TEXT, `userName` TEXT, `userPhone` TEXT, `userSort` TEXT, `userState` INTEGER NOT NULL, `userType` INTEGER NOT NULL, `userUsername` TEXT)", "fields": [ { "fieldPath": "id", @@ -89,98 +263,80 @@ "notNull": true }, { - "fieldPath": "uid", - "columnName": "uid", + "fieldPath": "pinYin", + "columnName": "pinyin", "affinity": "TEXT", "notNull": false }, { - "fieldPath": "foodName", - "columnName": "food_name", + "fieldPath": "departmentId", + "columnName": "departmentId", "affinity": "TEXT", "notNull": false }, { - "fieldPath": "foodPhoto", - "columnName": "food_photo", + "fieldPath": "departmentName", + "columnName": "departmentName", "affinity": "TEXT", "notNull": false }, { - "fieldPath": "foodPrice", - "columnName": "food_price", + "fieldPath": "loginType", + "columnName": "loginType", "affinity": "INTEGER", "notNull": true }, { - "fieldPath": "foodFlavor", - "columnName": "food_flavor", + "fieldPath": "userAvatar", + "columnName": "userAvatar", "affinity": "TEXT", "notNull": false }, { - "fieldPath": "foodType", - "columnName": "food_type", + "fieldPath": "userEmail", + "columnName": "userEmail", "affinity": "TEXT", "notNull": false }, { - "fieldPath": "foodUnit", - "columnName": "food_unit", + "fieldPath": "userId", + "columnName": "userId", "affinity": "TEXT", "notNull": false }, { - "fieldPath": "foodWeight", - "columnName": "food_weight", + "fieldPath": "userName", + "columnName": "userName", "affinity": "TEXT", "notNull": false }, { - "fieldPath": "foodRemark", - "columnName": "food_remark", + "fieldPath": "userPhone", + "columnName": "userPhone", "affinity": "TEXT", "notNull": false }, { - "fieldPath": "canteenId", - "columnName": "canteen_id", + "fieldPath": "userSort", + "columnName": "userSort", "affinity": "TEXT", "notNull": false }, { - "fieldPath": "syncNumber", - "columnName": "sync_number", + "fieldPath": "userState", + "columnName": "userState", "affinity": "INTEGER", "notNull": true }, { - "fieldPath": "creator", - "columnName": "creator", - "affinity": "TEXT", - "notNull": false + "fieldPath": "userType", + "columnName": "userType", + "affinity": "INTEGER", + "notNull": true }, { - "fieldPath": "gmtCreate", - "columnName": "gmt_create", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "modifier", - "columnName": "modifier", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "gmtModified", - "columnName": "gmt_modified", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDelete", - "columnName": "is_delete", + "fieldPath": "userUsername", + "columnName": "userUsername", "affinity": "TEXT", "notNull": false } @@ -189,14 +345,14 @@ "columnNames": [ "id" ], - "autoGenerate": false + "autoGenerate": true }, "indices": [], "foreignKeys": [] }, { - "tableName": "food_publish", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `publish_id` TEXT, `publish_date` TEXT, `publish_type` TEXT, `canteen_id` TEXT, `sync_number` INTEGER NOT NULL, `creator` TEXT, `gmt_create` TEXT, `modifier` TEXT, `gmt_modified` TEXT, `is_delete` TEXT, PRIMARY KEY(`id`))", + "tableName": "db_often_contact", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `userId` TEXT)", "fields": [ { "fieldPath": "id", @@ -205,62 +361,8 @@ "notNull": true }, { - "fieldPath": "publishId", - "columnName": "publish_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "publishDate", - "columnName": "publish_date", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "publishType", - "columnName": "publish_type", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "canteenId", - "columnName": "canteen_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "syncNumber", - "columnName": "sync_number", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "creator", - "columnName": "creator", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "gmtCreate", - "columnName": "gmt_create", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "modifier", - "columnName": "modifier", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "gmtModified", - "columnName": "gmt_modified", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDelete", - "columnName": "is_delete", + "fieldPath": "userId", + "columnName": "userId", "affinity": "TEXT", "notNull": false } @@ -269,595 +371,7 @@ "columnNames": [ "id" ], - "autoGenerate": false - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "food_publish_food", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `publish_menu_id` TEXT, `publish_id` TEXT, `food_id` TEXT, `sync_number` INTEGER NOT NULL, `creator` TEXT, `gmt_create` TEXT, `modifier` TEXT, `gmt_modified` TEXT, `is_delete` TEXT, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "publishMenuId", - "columnName": "publish_menu_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "publishId", - "columnName": "publish_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "foodId", - "columnName": "food_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "syncNumber", - "columnName": "sync_number", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "creator", - "columnName": "creator", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "gmtCreate", - "columnName": "gmt_create", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "modifier", - "columnName": "modifier", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "gmtModified", - "columnName": "gmt_modified", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDelete", - "columnName": "is_delete", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": false - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "food_subscribe", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `subscribe_id` TEXT, `publish_id` TEXT, `subscribe_date` TEXT, `publish_type` TEXT, `subscribe_status` TEXT, `subscribe_time1` TEXT, `subscribe_time2` TEXT, `subscribe_time3` TEXT, `subscribe_time4` TEXT, `subscribe_number` TEXT, `subscribe_qrcode` TEXT, `subscribe_remark` TEXT, `subscribe_price` INTEGER NOT NULL, `subscribe_count` INTEGER NOT NULL, `subscribe_unit_count` INTEGER NOT NULL, `sync_number` INTEGER NOT NULL, `creator` TEXT, `gmt_create` TEXT, `modifier` TEXT, `gmt_modified` TEXT, `is_delete` TEXT, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "subscribeId", - "columnName": "subscribe_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "publishId", - "columnName": "publish_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subscribeDate", - "columnName": "subscribe_date", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "publishType", - "columnName": "publish_type", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subscribeStatus", - "columnName": "subscribe_status", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subscribeTime1", - "columnName": "subscribe_time1", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subscribeTime2", - "columnName": "subscribe_time2", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subscribeTime3", - "columnName": "subscribe_time3", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subscribeTime4", - "columnName": "subscribe_time4", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subscribeNumber", - "columnName": "subscribe_number", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subscribeQrcode", - "columnName": "subscribe_qrcode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subscribeRemark", - "columnName": "subscribe_remark", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subscribePrice", - "columnName": "subscribe_price", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "subscribeCount", - "columnName": "subscribe_count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "subscribeUnitCount", - "columnName": "subscribe_unit_count", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "syncNumber", - "columnName": "sync_number", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "creator", - "columnName": "creator", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "gmtCreate", - "columnName": "gmt_create", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "modifier", - "columnName": "modifier", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "gmtModified", - "columnName": "gmt_modified", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDelete", - "columnName": "is_delete", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": false - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "food_subscribe_food", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `subscribe_food_id` TEXT, `food_id` TEXT, `food_name` TEXT, `food_photo` TEXT, `food_price` TEXT, `count` TEXT, `total_price` TEXT, `sync_number` TEXT, `creator` TEXT, `gmt_create` TEXT, `modifier` TEXT, `gmt_modified` TEXT, `is_delete` TEXT, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "subscribeFoodId", - "columnName": "subscribe_food_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "foodId", - "columnName": "food_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "foodName", - "columnName": "food_name", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "foodPhoto", - "columnName": "food_photo", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "foodPrice", - "columnName": "food_price", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "count", - "columnName": "count", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "totalPrice", - "columnName": "total_price", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "syncNumber", - "columnName": "sync_number", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "creator", - "columnName": "creator", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "gmtCreate", - "columnName": "gmt_create", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "modifier", - "columnName": "modifier", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "gmtModified", - "columnName": "gmt_modified", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDelete", - "columnName": "is_delete", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": false - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_account", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `account_id` TEXT, `account_money` TEXT, `account_number` INTEGER NOT NULL, `sync_number` INTEGER NOT NULL, `creator` TEXT, `gmt_create` TEXT, `modifier` TEXT, `gmt_modified` TEXT, `is_delete` TEXT, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "accountId", - "columnName": "account_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "accountMoney", - "columnName": "account_money", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "accountNumber", - "columnName": "account_number", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "syncNumber", - "columnName": "sync_number", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "creator", - "columnName": "creator", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "gmtCreate", - "columnName": "gmt_create", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "modifier", - "columnName": "modifier", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "gmtModified", - "columnName": "gmt_modified", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDelete", - "columnName": "is_delete", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": false - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_account_item", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `account_item_id` TEXT, `account_old_money` INTEGER NOT NULL, `account_now_money` INTEGER NOT NULL, `account_item_mode` TEXT, `account_item_money` INTEGER NOT NULL, `account_item_remark` TEXT, `account_id` TEXT, `subscribe_id` TEXT, `charge_id` TEXT, `sync_number` INTEGER NOT NULL, `creator` TEXT, `gmt_create` TEXT, `modifier` TEXT, `gmt_modified` TEXT, `is_delete` TEXT, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "accountItemId", - "columnName": "account_item_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "accountOldMoney", - "columnName": "account_old_money", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "accountNowMoney", - "columnName": "account_now_money", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "accountItemMode", - "columnName": "account_item_mode", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "accountItemMoney", - "columnName": "account_item_money", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "accountItemRemark", - "columnName": "account_item_remark", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "accountId", - "columnName": "account_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "subscribeId", - "columnName": "subscribe_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "chargeId", - "columnName": "charge_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "syncNumber", - "columnName": "sync_number", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "creator", - "columnName": "creator", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "gmtCreate", - "columnName": "gmt_create", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "modifier", - "columnName": "modifier", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "gmtModified", - "columnName": "gmt_modified", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDelete", - "columnName": "is_delete", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": false - }, - "indices": [], - "foreignKeys": [] - }, - { - "tableName": "user_charge", - "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `charge_id` TEXT, `charge_price` INTEGER NOT NULL, `charge_status` TEXT, `account_id` TEXT, `charge_remark` TEXT, `sync_number` INTEGER NOT NULL, `creator` TEXT, `gmt_create` TEXT, `modifier` TEXT, `gmt_modified` TEXT, `is_delete` TEXT, PRIMARY KEY(`id`))", - "fields": [ - { - "fieldPath": "id", - "columnName": "id", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "chargeId", - "columnName": "charge_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "chargePrice", - "columnName": "charge_price", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "chargeStatus", - "columnName": "charge_status", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "accountId", - "columnName": "account_id", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "chargeRemark", - "columnName": "charge_remark", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "syncNumber", - "columnName": "sync_number", - "affinity": "INTEGER", - "notNull": true - }, - { - "fieldPath": "creator", - "columnName": "creator", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "gmtCreate", - "columnName": "gmt_create", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "modifier", - "columnName": "modifier", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "gmtModified", - "columnName": "gmt_modified", - "affinity": "TEXT", - "notNull": false - }, - { - "fieldPath": "isDelete", - "columnName": "is_delete", - "affinity": "TEXT", - "notNull": false - } - ], - "primaryKey": { - "columnNames": [ - "id" - ], - "autoGenerate": false + "autoGenerate": true }, "indices": [], "foreignKeys": [] @@ -866,7 +380,7 @@ "views": [], "setupQueries": [ "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", - "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'c9030535cf5745092fdb10230bdb92b9')" + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'bd55472656a46bebcbba97c2e18ecd4e')" ] } } \ No newline at end of file diff --git a/baselib/src/main/java/com/tenlionsoft/baselib/constant/PathConfig.java b/baselib/src/main/java/com/tenlionsoft/baselib/constant/PathConfig.java index 9e87202..ddeacfa 100755 --- a/baselib/src/main/java/com/tenlionsoft/baselib/constant/PathConfig.java +++ b/baselib/src/main/java/com/tenlionsoft/baselib/constant/PathConfig.java @@ -131,6 +131,11 @@ public class PathConfig { public static final String PATH_MODULE_OA_FRAGMENT_DOC = "/oamodule/fragment/document";//文档 public static final String PATH_MODULE_OA_FRAGMENT_EMAIL = "/oamodule/fragment/email";//邮件 public static final String PATH_MODULE_OA_FRAGMENT_MINE = "/oamodule/fragment/mine";//我的 + + + public static final String PATH_MODULE_OA_ACTIVITY_ADDRESS_LIST = "/oamodule/activity/addresslist";//通讯录 + public static final String PATH_MODULE_OA_ACTIVITY_ADDRESS_USER_DETAIL = "/oamodule/activity/addresslistUserDetail";//通讯录用户详情 + public static final String PATH_MODULE_OA_ACTIVITY_SEL_DEPT = "/oamodule/activity/chooseDept";//部门选择 public static final String PATH_MODULE_OA_ACTIVITY_SEL_PERSON = "/oamodule/activity/choosePerson";//选择人员 public static final String PATH_MODULE_OA_ACTIVITY_SEL_DRIVER = "/oamodule/activity/chooseDriver";//选择驾驶员 diff --git a/baselib/src/main/java/com/tenlionsoft/baselib/core/db/AppDatabase.java b/baselib/src/main/java/com/tenlionsoft/baselib/core/db/AppDatabase.java index efb571b..59a9d44 100644 --- a/baselib/src/main/java/com/tenlionsoft/baselib/core/db/AppDatabase.java +++ b/baselib/src/main/java/com/tenlionsoft/baselib/core/db/AppDatabase.java @@ -2,35 +2,13 @@ package com.tenlionsoft.baselib.core.db; import android.content.Context; -import com.tenlionsoft.baselib.core.db.beans.FoodCanteenBean; -import com.tenlionsoft.baselib.core.db.beans.FoodFoodBean; -import com.tenlionsoft.baselib.core.db.beans.FoodPublishBean; -import com.tenlionsoft.baselib.core.db.beans.FoodPublishFoodBean; -import com.tenlionsoft.baselib.core.db.beans.FoodSubscribeBean; -import com.tenlionsoft.baselib.core.db.beans.FoodSubscribeFoodBean; -import com.tenlionsoft.baselib.core.db.beans.LocalMediaBean; -import com.tenlionsoft.baselib.core.db.beans.UserAccountBean; -import com.tenlionsoft.baselib.core.db.beans.UserAccountItemBean; -import com.tenlionsoft.baselib.core.db.beans.UserChargeBean; -import com.tenlionsoft.baselib.core.db.daos.FoodCanteenDao; -import com.tenlionsoft.baselib.core.db.daos.FoodFoodDao; -import com.tenlionsoft.baselib.core.db.daos.FoodPublishDao; -import com.tenlionsoft.baselib.core.db.daos.FoodPublishFoodDao; -import com.tenlionsoft.baselib.core.db.daos.FoodSubscribeDao; -import com.tenlionsoft.baselib.core.db.daos.FoodSubscribeFoodDao; -import com.tenlionsoft.baselib.core.db.daos.LocalMediaDao; -import com.tenlionsoft.baselib.core.db.daos.UserAccountDao; -import com.tenlionsoft.baselib.core.db.daos.UserAccountItemDao; -import com.tenlionsoft.baselib.core.db.daos.UserChargeDao; +import com.tenlionsoft.baselib.core.beans.DeptDatabaseBean; +import com.tenlionsoft.baselib.core.beans.OftenContactBean; +import com.tenlionsoft.baselib.core.beans.UserDatabaseBean; -import org.jetbrains.annotations.NotNull; - -import androidx.annotation.NonNull; import androidx.room.Database; import androidx.room.Room; import androidx.room.RoomDatabase; -import androidx.room.migration.Migration; -import androidx.sqlite.db.SupportSQLiteDatabase; /** * 作者: adam @@ -39,37 +17,17 @@ import androidx.sqlite.db.SupportSQLiteDatabase; * 描述: */ @Database(entities = { - FoodCanteenBean.class, - FoodFoodBean.class, - FoodPublishBean.class, - FoodPublishFoodBean.class, - FoodSubscribeBean.class, - FoodSubscribeFoodBean.class, - UserAccountBean.class, - UserAccountItemBean.class, - UserChargeBean.class, - LocalMediaBean.class}, version = 2) + DeptDatabaseBean.class, + UserDatabaseBean.class, + OftenContactBean.class}, version = 1) public abstract class AppDatabase extends RoomDatabase { - public abstract FoodCanteenDao getFoodCanteenDao();//食堂信息 - public abstract FoodFoodDao getFoodFoodDao();//菜品 + public abstract DeptDao getDeptDao(); - public abstract FoodPublishDao getFoodPublishDao();//菜单 + public abstract UserDao getUserDao(); - public abstract FoodPublishFoodDao getFoodPublishFoodDao();//菜单菜品 - - public abstract FoodSubscribeDao getFoodSubscribeDao();//订单 - - public abstract FoodSubscribeFoodDao getFoodSubscribeFoodDao();//订单关联菜品 - - public abstract UserAccountDao getUserAccountDao();//账户 - - public abstract UserAccountItemDao getUserAccountItemDao();//账户流水 - - public abstract UserChargeDao getUserChargeDao();//账户充值记录 - - public abstract LocalMediaDao getLocalMediaDao();//本地下载的媒体记录 + public abstract OftenContactDao getOftenContactDao(); private static AppDatabase mInstance; @@ -77,7 +35,7 @@ public abstract class AppDatabase extends RoomDatabase { if (mInstance == null) { synchronized (AppDatabase.class) { if (mInstance == null) { - mInstance = Room.databaseBuilder(ctx, AppDatabase.class, "sys_police_food.db") + mInstance = Room.databaseBuilder(ctx, AppDatabase.class, "sys_msg.db") .allowMainThreadQueries() .build(); } @@ -85,12 +43,4 @@ public abstract class AppDatabase extends RoomDatabase { } return mInstance; } - - static final Migration MIGRATION_1_2 = new Migration(1, 2) { - @Override - public void migrate(@NonNull @NotNull SupportSQLiteDatabase database) { - } - }; - - } diff --git a/baselib/src/main/java/com/tenlionsoft/baselib/core/db/DataCenter.java b/baselib/src/main/java/com/tenlionsoft/baselib/core/db/DataCenter.java index 67fd5bf..11af6dd 100644 --- a/baselib/src/main/java/com/tenlionsoft/baselib/core/db/DataCenter.java +++ b/baselib/src/main/java/com/tenlionsoft/baselib/core/db/DataCenter.java @@ -59,16 +59,16 @@ public class DataCenter { private void initDataCenter() { Observable.create(emitter -> { try { - mFoodCanteenDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getFoodCanteenDao(); - mFoodFoodDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getFoodFoodDao(); - mFoodPublishDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getFoodPublishDao(); - mFoodPublishFoodDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getFoodPublishFoodDao(); - mFoodSubscribeDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getFoodSubscribeDao(); - mFoodSubscribeFoodDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getFoodSubscribeFoodDao(); - mUserAccountDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getUserAccountDao(); - mUserAccountItemDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getUserAccountItemDao(); - mUserChargeDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getUserChargeDao(); - mLocalMediaDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getLocalMediaDao(); +// mFoodCanteenDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getFoodCanteenDao(); +// mFoodFoodDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getFoodFoodDao(); +// mFoodPublishDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getFoodPublishDao(); +// mFoodPublishFoodDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getFoodPublishFoodDao(); +// mFoodSubscribeDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getFoodSubscribeDao(); +// mFoodSubscribeFoodDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getFoodSubscribeFoodDao(); +// mUserAccountDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getUserAccountDao(); +// mUserAccountItemDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getUserAccountItemDao(); +// mUserChargeDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getUserChargeDao(); +// mLocalMediaDao = AppDatabase.getInstance(BaseAppContext.getInstance()).getLocalMediaDao(); emitter.onNext(""); } catch (Exception e) { emitter.onError(e); diff --git a/baselib/src/main/java/com/tenlionsoft/baselib/core/db/DeptDao.java b/baselib/src/main/java/com/tenlionsoft/baselib/core/db/DeptDao.java new file mode 100644 index 0000000..c65a24e --- /dev/null +++ b/baselib/src/main/java/com/tenlionsoft/baselib/core/db/DeptDao.java @@ -0,0 +1,35 @@ +package com.tenlionsoft.baselib.core.db; + +import com.tenlionsoft.baselib.core.beans.DeptDatabaseBean; + +import java.util.List; + +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.Query; + +/** + * 作者: adam + * 日期: 2021/10/28 - 9:15 上午 + * 邮箱: itgaojian@163.com + * 描述: 部门表 + */ +@Dao +public interface DeptDao { + + @Insert + void insertAll(List beans); + + @Query("DELETE FROM db_dept") + void deleteAll(); + + + @Query("SELECT * FROM db_dept WHERE `departmentParentId` = (:pid)") + List queryByPid(String pid); + + @Query("SELECT * FROM db_dept WHERE `departmentParentId`=(:pid) AND departmentName LIKE '%' || :keyword || '%' OR departmentTel LIKE '%' || :keyword || '%'") + List queryByPidAndKeyWord(String pid, String keyword); + + @Query("SELECT * FROM db_dept WHERE departmentId = (:id)") + DeptDatabaseBean getDeptById(String id); +} diff --git a/baselib/src/main/java/com/tenlionsoft/baselib/core/db/OftenContactDao.java b/baselib/src/main/java/com/tenlionsoft/baselib/core/db/OftenContactDao.java new file mode 100644 index 0000000..b8535b0 --- /dev/null +++ b/baselib/src/main/java/com/tenlionsoft/baselib/core/db/OftenContactDao.java @@ -0,0 +1,27 @@ +package com.tenlionsoft.baselib.core.db; + +import com.tenlionsoft.baselib.core.beans.OftenContactBean; + +import androidx.room.Dao; +import androidx.room.Delete; +import androidx.room.Insert; +import androidx.room.Query; + +/** + * 作者: adam + * 日期: 2021/10/28 - 10:49 上午 + * 邮箱: itgaojian@163.com + * 描述: + */ +@Dao +public interface OftenContactDao { + + @Insert + void insertUser(OftenContactBean bean); + + @Query("SELECT * FROM db_often_contact WHERE userId=(:userid)") + OftenContactBean getOftenContactByUserId(String userid); + + @Delete + void deleteUser(OftenContactBean bean); +} diff --git a/baselib/src/main/java/com/tenlionsoft/baselib/core/db/UserDao.java b/baselib/src/main/java/com/tenlionsoft/baselib/core/db/UserDao.java new file mode 100644 index 0000000..e670f8a --- /dev/null +++ b/baselib/src/main/java/com/tenlionsoft/baselib/core/db/UserDao.java @@ -0,0 +1,102 @@ +package com.tenlionsoft.baselib.core.db; + +import com.tenlionsoft.baselib.core.beans.UserDatabaseBean; + +import java.util.List; + +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.Query; + +/** + * 作者: adam + * 日期: 2021/10/28 - 9:16 上午 + * 邮箱: itgaojian@163.com + * 描述: 用户表 + */ +@Dao +public interface UserDao { + + + @Insert + void insertAll(List beans); + + @Query("DELETE FROM db_user") + void deleteAll(); + + @Query("SELECT * FROM db_user") + List getAllUser(); + + /** + * 除了自己其他所有联系人 + * + * @param id + * @return + */ + @Query("SELECT * FROM db_user WHERE userId != (:id)") + List getExceptMineUsers(String id); + + /** + * 获取联系人数量 + */ + @Query("SELECT COUNT(*) FROM db_user") + int getCount(); + + /** + * 分页获取联系人 + */ + @Query("SELECT * FROM db_user WHERE userId != (:id) LIMIT (:page),(:rows)") + List getExceptMineUserByPage(String id, int page, int rows); + + /** + * 在一定范围内的user + * + * @param ids + * @return + */ + @Query("SELECT * FROM db_user WHERE userId in (:ids)") + List getUsersByIds(String ids); + + /** + * 根据UserId获取详情 + */ + @Query("SELECT * FROM db_user WHERE userId=(:id)") + UserDatabaseBean getUserByUserId(String id); + + /** + * 获取全部常用联系人 + */ + @Query("SELECT * FROM db_user INNER JOIN db_often_contact ON db_often_contact.userId= db_user.userId") + List getAllOftenContact(); + + /** + * 根据关键字查询联系人 + */ + @Query("SELECT * FROM (SELECT * FROM db_user INNER JOIN db_often_contact ON db_often_contact.userId= db_user.userId) WHERE userName LIKE '%' || :keyword || '%' OR userPhone LIKE '%' || :keyword || '%'") + List getOftenContactByKeyword(String keyword); + +// /** +// * Rxjava方式获取全部常用联系人 +// */ +// @Query("SELECT * FROM db_user INNER JOIN db_often_contact ON db_often_contact.userId= db_user.userId") +// Flowable> getRxAllOftenContact(); + + /** + * 根据部门Id获取部门下所有人员 + */ + @Query("SELECT * FROM db_user WHERE departmentId = (:deptId)") + List getUsersByDeptId(String deptId); + + /** + * 关键字搜索 + */ + @Query("SELECT * FROM db_user WHERE `departmentId`=(:deptId) AND userName LIKE '%' || :keyword || '%' OR userPhone LIKE '%' || :keyword || '%'") + List queryByDeptIdAndKeyWord(String deptId, String keyword); + + @Query("SELECT * FROM db_user WHERE userName LIKE (:name)") + List getUsersLikeName(String name); + + + @Query("SELECT * FROM db_user WHERE userName LIKE '%' || :name || '%'") + List getUsersLikeNameSync(String name); +} diff --git a/baselib/src/main/java/com/tenlionsoft/baselib/core/db/beans/DeptDatabaseBean.java b/baselib/src/main/java/com/tenlionsoft/baselib/core/db/beans/DeptDatabaseBean.java new file mode 100644 index 0000000..6174dbb --- /dev/null +++ b/baselib/src/main/java/com/tenlionsoft/baselib/core/db/beans/DeptDatabaseBean.java @@ -0,0 +1,427 @@ +package com.tenlionsoft.baselib.core.db.beans; + +import java.util.List; + +import androidx.annotation.NonNull; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.Ignore; +import androidx.room.PrimaryKey; + +/** + * 作者: adam + * 日期: 2021/10/28 - 9:12 上午 + * 邮箱: itgaojian@163.com + * 描述: 部门表 + */ +@Entity(tableName = "db_dept") +public class DeptDatabaseBean { + @NonNull + @PrimaryKey(autoGenerate = true) + private int id; + + @ColumnInfo(name = "departmentAddress") + private String departmentAddress; + @ColumnInfo(name = "departmentArea1Code") + private String departmentArea1Code; + @ColumnInfo(name = "departmentArea1Id") + private String departmentArea1Id; + @ColumnInfo(name = "departmentArea1Name") + private String departmentArea1Name; + @ColumnInfo(name = "departmentArea2Code") + private String departmentArea2Code; + @ColumnInfo(name = "departmentArea2Id") + private String departmentArea2Id; + @ColumnInfo(name = "departmentArea2Name") + private String departmentArea2Name; + @ColumnInfo(name = "departmentArea3Code") + private String departmentArea3Code; + @ColumnInfo(name = "departmentArea3Id") + private String departmentArea3Id; + @ColumnInfo(name = "departmentArea3Name") + private String departmentArea3Name; + @ColumnInfo(name = "departmentArea4Code") + private String departmentArea4Code; + @ColumnInfo(name = "departmentArea4Id") + private String departmentArea4Id; + @ColumnInfo(name = "departmentArea4Name") + private String departmentArea4Name; + @ColumnInfo(name = "departmentArea5Code") + private String departmentArea5Code; + @ColumnInfo(name = "departmentArea5Id") + private String departmentArea5Id; + @ColumnInfo(name = "departmentArea5Name") + private String departmentArea5Name; + @ColumnInfo(name = "departmentCode") + private String departmentCode; + @ColumnInfo(name = "departmentDuty") + private String departmentDuty; + @ColumnInfo(name = "departmentFax") + private String departmentFax; + @ColumnInfo(name = "departmentId") + private String departmentId; + @ColumnInfo(name = "departmentIntId") + private int departmentIntId; + @ColumnInfo(name = "departmentLatitude") + private String departmentLatitude; + @ColumnInfo(name = "departmentLogo") + private int departmentLogo; + @ColumnInfo(name = "departmentLogoHover") + private int departmentLogoHover; + @ColumnInfo(name = "departmentLongitude") + private String departmentLongitude; + @ColumnInfo(name = "departmentMaster") + private String departmentMaster; + @ColumnInfo(name = "departmentMasterName") + private String departmentMasterName; + @ColumnInfo(name = "departmentName") + private String departmentName; + @ColumnInfo(name = "departmentNameEn") + private String departmentNameEn; + @ColumnInfo(name = "departmentNameOther") + private String departmentNameOther; + @ColumnInfo(name = "departmentNo") + private String departmentNo; + @ColumnInfo(name = "departmentOrder") + private String departmentOrder; + @ColumnInfo(name = "departmentParentId") + private String departmentParentId; + @ColumnInfo(name = "departmentParentName") + private String departmentParentName; + @ColumnInfo(name = "departmentState") + private int departmentState; + @ColumnInfo(name = "departmentSummary") + private String departmentSummary; + @ColumnInfo(name = "departmentTel") + private String departmentTel; + @ColumnInfo(name = "departmentType") + private int departmentType; + + + @Ignore + private List subDepartments; + + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + + public String getDepartmentAddress() { + return departmentAddress; + } + + public void setDepartmentAddress(String departmentAddress) { + this.departmentAddress = departmentAddress; + } + + public String getDepartmentArea1Code() { + return departmentArea1Code; + } + + public void setDepartmentArea1Code(String departmentArea1Code) { + this.departmentArea1Code = departmentArea1Code; + } + + public String getDepartmentArea1Id() { + return departmentArea1Id; + } + + public void setDepartmentArea1Id(String departmentArea1Id) { + this.departmentArea1Id = departmentArea1Id; + } + + public String getDepartmentArea1Name() { + return departmentArea1Name; + } + + public void setDepartmentArea1Name(String departmentArea1Name) { + this.departmentArea1Name = departmentArea1Name; + } + + public String getDepartmentArea2Code() { + return departmentArea2Code; + } + + public void setDepartmentArea2Code(String departmentArea2Code) { + this.departmentArea2Code = departmentArea2Code; + } + + public String getDepartmentArea2Id() { + return departmentArea2Id; + } + + public void setDepartmentArea2Id(String departmentArea2Id) { + this.departmentArea2Id = departmentArea2Id; + } + + public String getDepartmentArea2Name() { + return departmentArea2Name; + } + + public void setDepartmentArea2Name(String departmentArea2Name) { + this.departmentArea2Name = departmentArea2Name; + } + + public String getDepartmentArea3Code() { + return departmentArea3Code; + } + + public void setDepartmentArea3Code(String departmentArea3Code) { + this.departmentArea3Code = departmentArea3Code; + } + + public String getDepartmentArea3Id() { + return departmentArea3Id; + } + + public void setDepartmentArea3Id(String departmentArea3Id) { + this.departmentArea3Id = departmentArea3Id; + } + + public String getDepartmentArea3Name() { + return departmentArea3Name; + } + + public void setDepartmentArea3Name(String departmentArea3Name) { + this.departmentArea3Name = departmentArea3Name; + } + + public String getDepartmentArea4Code() { + return departmentArea4Code; + } + + public void setDepartmentArea4Code(String departmentArea4Code) { + this.departmentArea4Code = departmentArea4Code; + } + + public String getDepartmentArea4Id() { + return departmentArea4Id; + } + + public void setDepartmentArea4Id(String departmentArea4Id) { + this.departmentArea4Id = departmentArea4Id; + } + + public String getDepartmentArea4Name() { + return departmentArea4Name; + } + + public void setDepartmentArea4Name(String departmentArea4Name) { + this.departmentArea4Name = departmentArea4Name; + } + + public String getDepartmentArea5Code() { + return departmentArea5Code; + } + + public void setDepartmentArea5Code(String departmentArea5Code) { + this.departmentArea5Code = departmentArea5Code; + } + + public String getDepartmentArea5Id() { + return departmentArea5Id; + } + + public void setDepartmentArea5Id(String departmentArea5Id) { + this.departmentArea5Id = departmentArea5Id; + } + + public String getDepartmentArea5Name() { + return departmentArea5Name; + } + + public void setDepartmentArea5Name(String departmentArea5Name) { + this.departmentArea5Name = departmentArea5Name; + } + + public String getDepartmentCode() { + return departmentCode; + } + + public void setDepartmentCode(String departmentCode) { + this.departmentCode = departmentCode; + } + + public String getDepartmentDuty() { + return departmentDuty; + } + + public void setDepartmentDuty(String departmentDuty) { + this.departmentDuty = departmentDuty; + } + + public String getDepartmentFax() { + return departmentFax; + } + + public void setDepartmentFax(String departmentFax) { + this.departmentFax = departmentFax; + } + + public String getDepartmentId() { + return departmentId; + } + + public void setDepartmentId(String departmentId) { + this.departmentId = departmentId; + } + + public int getDepartmentIntId() { + return departmentIntId; + } + + public void setDepartmentIntId(int departmentIntId) { + this.departmentIntId = departmentIntId; + } + + public String getDepartmentLatitude() { + return departmentLatitude; + } + + public void setDepartmentLatitude(String departmentLatitude) { + this.departmentLatitude = departmentLatitude; + } + + public int getDepartmentLogo() { + return departmentLogo; + } + + public void setDepartmentLogo(int departmentLogo) { + this.departmentLogo = departmentLogo; + } + + public int getDepartmentLogoHover() { + return departmentLogoHover; + } + + public void setDepartmentLogoHover(int departmentLogoHover) { + this.departmentLogoHover = departmentLogoHover; + } + + public String getDepartmentLongitude() { + return departmentLongitude; + } + + public void setDepartmentLongitude(String departmentLongitude) { + this.departmentLongitude = departmentLongitude; + } + + public String getDepartmentMaster() { + return departmentMaster; + } + + public void setDepartmentMaster(String departmentMaster) { + this.departmentMaster = departmentMaster; + } + + public String getDepartmentMasterName() { + return departmentMasterName; + } + + public void setDepartmentMasterName(String departmentMasterName) { + this.departmentMasterName = departmentMasterName; + } + + public String getDepartmentName() { + return departmentName; + } + + public void setDepartmentName(String departmentName) { + this.departmentName = departmentName; + } + + public String getDepartmentNameEn() { + return departmentNameEn; + } + + public void setDepartmentNameEn(String departmentNameEn) { + this.departmentNameEn = departmentNameEn; + } + + public String getDepartmentNameOther() { + return departmentNameOther; + } + + public void setDepartmentNameOther(String departmentNameOther) { + this.departmentNameOther = departmentNameOther; + } + + public String getDepartmentNo() { + return departmentNo; + } + + public void setDepartmentNo(String departmentNo) { + this.departmentNo = departmentNo; + } + + public String getDepartmentOrder() { + return departmentOrder; + } + + public void setDepartmentOrder(String departmentOrder) { + this.departmentOrder = departmentOrder; + } + + public String getDepartmentParentId() { + return departmentParentId; + } + + public void setDepartmentParentId(String departmentParentId) { + this.departmentParentId = departmentParentId; + } + + public String getDepartmentParentName() { + return departmentParentName; + } + + public void setDepartmentParentName(String departmentParentName) { + this.departmentParentName = departmentParentName; + } + + public int getDepartmentState() { + return departmentState; + } + + public void setDepartmentState(int departmentState) { + this.departmentState = departmentState; + } + + public String getDepartmentSummary() { + return departmentSummary; + } + + public void setDepartmentSummary(String departmentSummary) { + this.departmentSummary = departmentSummary; + } + + public String getDepartmentTel() { + return departmentTel; + } + + public void setDepartmentTel(String departmentTel) { + this.departmentTel = departmentTel; + } + + public int getDepartmentType() { + return departmentType; + } + + public void setDepartmentType(int departmentType) { + this.departmentType = departmentType; + } + + public List getSubDepartments() { + return subDepartments; + } + + public void setSubDepartments(List subDepartments) { + this.subDepartments = subDepartments; + } + + +} diff --git a/baselib/src/main/java/com/tenlionsoft/baselib/core/db/beans/OftenContactBean.java b/baselib/src/main/java/com/tenlionsoft/baselib/core/db/beans/OftenContactBean.java new file mode 100644 index 0000000..65c51be --- /dev/null +++ b/baselib/src/main/java/com/tenlionsoft/baselib/core/db/beans/OftenContactBean.java @@ -0,0 +1,39 @@ +package com.tenlionsoft.baselib.core.db.beans; + +import androidx.annotation.NonNull; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.PrimaryKey; + + +/** + * 作者: adam + * 日期: 2021/10/28 - 5:20 下午 + * 邮箱: itgaojian@163.com + * 描述: + */ +@Entity(tableName = "db_often_contact") +public class OftenContactBean { + @NonNull + @PrimaryKey(autoGenerate = true) + private int id; + + @ColumnInfo(name = "userId") + private String userId; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getUserId() { + return userId; + } + + public void setUserId(String userId) { + this.userId = userId; + } +} diff --git a/baselib/src/main/java/com/tenlionsoft/baselib/core/db/daos/MessageDao.java b/baselib/src/main/java/com/tenlionsoft/baselib/core/db/daos/MessageDao.java deleted file mode 100644 index 00a62c9..0000000 --- a/baselib/src/main/java/com/tenlionsoft/baselib/core/db/daos/MessageDao.java +++ /dev/null @@ -1,107 +0,0 @@ -package com.tenlionsoft.baselib.core.db.daos; - -import com.tenlionsoft.baselib.core.beans.MessageBean; - -import java.util.List; - -import androidx.room.Dao; -import androidx.room.Delete; -import androidx.room.Insert; -import androidx.room.OnConflictStrategy; -import androidx.room.Query; - -/** - * 作者: adam - * 日期: 1/18/21 - 5:36 PM - * 邮箱: itgaojian@163.com - * 描述: tableName=message - */ -@Dao -public interface MessageDao { - /** - * 获取全部信息 - * - * @return - */ - @Query("SELECT * FROM db_msg") - List getAllMsg(); - - /** - * 根据ID获取消息 - * - * @param id - * @return - */ - @Query("SELECT * FROM db_msg WHERE id =(:id) ") - List getMsgById(String id); - - /** - * 根据信息来源查询消息 - * - * @param from - * @return - */ - @Query("SELECT * FROM db_msg WHERE `from`=(:from)") - List getMsgByFrom(String from); - - /** - * 根据发送给谁进行查询 - * - * @param to - * @return - */ - @Query("SELECT * FROM db_msg WHERE `to` =(:to)") - List getMsgByTo(String to); - - - /** - * 根据哪里 - * - * @param form - * @param pageSize - * @param page - * @return - */ - @Query("SELECT * FROM db_msg WHERE `from`=(:form) ORDER BY timestamp LIMIT (((:page)-1)*(:pageSize)),(:pageSize)") - List getMsgByPage(String form, int pageSize, int page); - - /** - * 查询与单人的聊天记录 - */ - @Query("SELECT * FROM db_msg t1 WHERE t1.id IN (SELECT id FROM db_msg WHERE `from`=(:form) AND `to`=(:to) OR `from`=(:to) AND `to`=(:form) ORDER BY timestamp DESC LIMIT (((:page)-1)*(:pageSize)),(:pageSize)) ORDER by t1.timestamp ASC") - List getMsgByFromOrToPage(String form, String to, int pageSize, int page); - - /** - * 清空与某个人的聊天记录 - */ - @Query("DELETE FROM db_msg WHERE `from`=(:from) AND `to`=(:to) OR `from`=(:to) AND `to`=(:from)") - void delChatHistory(String from, String to); - - /** - * 添加消息多个 - * - * @param beans - */ - @Insert(onConflict = OnConflictStrategy.REPLACE) - void insertAll(MessageBean... beans); - - /** - * 批量添加 - */ - @Insert(onConflict = OnConflictStrategy.REPLACE) - void insertAll(List beans); - - /** - * 添加消息-单个 - * - * @param bean - */ - @Insert(onConflict = OnConflictStrategy.REPLACE) - void insertMsg(MessageBean bean); - - /** - * 清除全部聊天记录 - */ - @Query("DELETE FROM db_msg") - void delAllMsg(); -} diff --git a/baselib/src/main/java/com/tenlionsoft/baselib/core/retrofit_net/BaseUrlApi.java b/baselib/src/main/java/com/tenlionsoft/baselib/core/retrofit_net/BaseUrlApi.java index 392b041..90724d3 100755 --- a/baselib/src/main/java/com/tenlionsoft/baselib/core/retrofit_net/BaseUrlApi.java +++ b/baselib/src/main/java/com/tenlionsoft/baselib/core/retrofit_net/BaseUrlApi.java @@ -7,8 +7,9 @@ package com.tenlionsoft.baselib.core.retrofit_net; */ public class BaseUrlApi { - public static final String IP = "http://192.168.0.120:8080/";/* 测试IP */ - // public static final String IP = "http://192.168.0.103:7008/";/* 测试IP */ + // public static final String IP = "http://192.168.0.120:8080/";/* 测试IP */ +// /systemoa/ + public static final String IP = "http://121.36.71.250/";/* 测试IP */ // public static final String IP = "http://www.wlcbsyzl.cn/";/* 正式IP */ public static final String SYS_USERCENTER = "usercenter/"; public static final String SYS_POPULATION = "population/";/*人口系统*/ diff --git a/baselib/src/main/res/drawable-xhdpi/app_logo_small.png b/baselib/src/main/res/drawable-xhdpi/app_logo_small.png index c3b0b50..cac5783 100644 Binary files a/baselib/src/main/res/drawable-xhdpi/app_logo_small.png and b/baselib/src/main/res/drawable-xhdpi/app_logo_small.png differ diff --git a/baselib/src/main/res/drawable-xhdpi/ic_add_contact_icon.png b/baselib/src/main/res/drawable-xhdpi/ic_add_contact_icon.png new file mode 100644 index 0000000..e98d3be Binary files /dev/null and b/baselib/src/main/res/drawable-xhdpi/ic_add_contact_icon.png differ diff --git a/baselib/src/main/res/drawable-xhdpi/ic_address_icon_16.png b/baselib/src/main/res/drawable-xhdpi/ic_address_icon_16.png new file mode 100644 index 0000000..c6c3d41 Binary files /dev/null and b/baselib/src/main/res/drawable-xhdpi/ic_address_icon_16.png differ diff --git a/baselib/src/main/res/drawable-xhdpi/ic_dept_contact_icon.png b/baselib/src/main/res/drawable-xhdpi/ic_dept_contact_icon.png new file mode 100644 index 0000000..a50ddd6 Binary files /dev/null and b/baselib/src/main/res/drawable-xhdpi/ic_dept_contact_icon.png differ diff --git a/baselib/src/main/res/drawable-xhdpi/ic_dept_icon_16.png b/baselib/src/main/res/drawable-xhdpi/ic_dept_icon_16.png new file mode 100644 index 0000000..0913f98 Binary files /dev/null and b/baselib/src/main/res/drawable-xhdpi/ic_dept_icon_16.png differ diff --git a/baselib/src/main/res/drawable-xhdpi/ic_email_icon.png b/baselib/src/main/res/drawable-xhdpi/ic_email_icon.png new file mode 100644 index 0000000..55c009d Binary files /dev/null and b/baselib/src/main/res/drawable-xhdpi/ic_email_icon.png differ diff --git a/baselib/src/main/res/drawable-xhdpi/ic_location_blue.png b/baselib/src/main/res/drawable-xhdpi/ic_location_blue.png new file mode 100755 index 0000000..8c574a9 Binary files /dev/null and b/baselib/src/main/res/drawable-xhdpi/ic_location_blue.png differ diff --git a/baselib/src/main/res/drawable-xhdpi/ic_phone_icon.png b/baselib/src/main/res/drawable-xhdpi/ic_phone_icon.png new file mode 100644 index 0000000..ee63518 Binary files /dev/null and b/baselib/src/main/res/drawable-xhdpi/ic_phone_icon.png differ diff --git a/baselib/src/main/res/drawable-xhdpi/ic_send_msg_icon.png b/baselib/src/main/res/drawable-xhdpi/ic_send_msg_icon.png new file mode 100644 index 0000000..02cfa97 Binary files /dev/null and b/baselib/src/main/res/drawable-xhdpi/ic_send_msg_icon.png differ diff --git a/baselib/src/main/res/drawable-xhdpi/ic_user_contact_icon.png b/baselib/src/main/res/drawable-xhdpi/ic_user_contact_icon.png new file mode 100644 index 0000000..ede0530 Binary files /dev/null and b/baselib/src/main/res/drawable-xhdpi/ic_user_contact_icon.png differ diff --git a/baselib/src/main/res/drawable-xhdpi/ic_voice_call_icon.png b/baselib/src/main/res/drawable-xhdpi/ic_voice_call_icon.png new file mode 100644 index 0000000..8dad61a Binary files /dev/null and b/baselib/src/main/res/drawable-xhdpi/ic_voice_call_icon.png differ diff --git a/baselib/src/main/res/layout/item_add_or_del_file.xml b/baselib/src/main/res/layout/item_add_or_del_file.xml index c58477e..ae39cac 100755 --- a/baselib/src/main/res/layout/item_add_or_del_file.xml +++ b/baselib/src/main/res/layout/item_add_or_del_file.xml @@ -49,7 +49,7 @@ android:scaleType="fitXY" android:src="@drawable/ic_close_no_cir" /> - showConfirmDialog()); isPad(); + initDatabase(); + } + + private void initDatabase() { + new Thread() { + @Override + public void run() { + super.run(); + AppDatabase.getInstance(BaseAppContext.getInstance()).getUserDao(); + AppDatabase.getInstance(BaseAppContext.getInstance()).getDeptDao(); + AppDatabase.getInstance(BaseAppContext.getInstance()).getOftenContactDao(); + } + }.start(); } private void showConfirmDialog() { diff --git a/mainmodule/src/main/res/layout/activity_login.xml b/mainmodule/src/main/res/layout/activity_login.xml index 7233763..9da1bff 100644 --- a/mainmodule/src/main/res/layout/activity_login.xml +++ b/mainmodule/src/main/res/layout/activity_login.xml @@ -170,7 +170,7 @@ android:focusable="true" android:text="忘记密码" android:textSize="15sp" - android:visibility="visible" /> + android:visibility="gone" /> diff --git a/oamodule/src/main/AndroidManifest.xml b/oamodule/src/main/AndroidManifest.xml index 7afc32d..ca3663a 100644 --- a/oamodule/src/main/AndroidManifest.xml +++ b/oamodule/src/main/AndroidManifest.xml @@ -3,18 +3,56 @@ package="com.tenlionsoft.oamodule"> - + + + - - - - - - + + + + + + mUserDatabaseBeanList; + private ProgressDialog mDialog; + private List mDatabaseBeanList; + private List mDatas; + private String mSelDeptId = "0"; + private DeptOrUserAdapter mAdapter; + private List mBeans; + private List mSelDatas; + private DeptChooseAdapter mSelAdapter; + private List mUserDatas = new ArrayList<>(); + private List mSearchData = new ArrayList<>(); + private String mKeyword; + private int mCurrentDeptIndex = 0; + + @Override + protected int setLayoutId() { + return R.layout.activity_address_list; + } + + @Override + public void initData() { + ButterKnife.bind(this); + mRlTitleBar.setVisibility(View.GONE); + ImmersionBar.with(this) + .statusBarDarkFont(true) + .statusBarColor(R.color.gray_bg) + .titleBar(mRlContentTitle) + .init(); + refreshView(STATE_LOAD_SUCCESS); + boolean isSync = UserLgUtils.getIsSync(); + if (isSync) { + refreshView(STATE_LOAD_SUCCESS); + initViews(); + } else { + showSyncDialog(); + } + } + + + /** + * 初始化视图 + */ + private void initViews() { + mIvBack.setOnClickListener(v -> finish()); + mCsvState.setState(CustomStateView.STATE_LOAD); + mDatas = new ArrayList<>(); + DeptDatabaseBean bean1 = new DeptDatabaseBean(); + bean1.setDepartmentName("组织部门"); + bean1.setDepartmentId("0"); + mSelDatas = new ArrayList<>(); + mSelDatas.add(bean1); + mSelAdapter = new DeptChooseAdapter(mActivity, mSelDatas); + LinearLayoutManager linearLayoutManager = new LinearLayoutManager(mActivity); + linearLayoutManager.setOrientation(LinearLayoutManager.HORIZONTAL); + mRlvSelDept.setLayoutManager(linearLayoutManager); + mRlvSelDept.setAdapter(mSelAdapter); + mAdapter = new DeptOrUserAdapter(mActivity, mDatas); + mRlvDept.setLayoutManager(new LinearLayoutManager(mActivity)); + mRlvDept.setAdapter(mAdapter); + + mRlvUsers.setLayoutManager(new LinearLayoutManager(mActivity)); + mRlvUsers.setAdapter(mAdapter); + mAdapter.addOnItemClickListener(o -> { + if (o instanceof UserDatabaseBean) { + //用户 + UserDatabaseBean bean = (UserDatabaseBean) o; + ARouter.getInstance() + .build(PathConfig.PATH_MODULE_OA_ACTIVITY_ADDRESS_USER_DETAIL) + .withString("id", bean.getUserId()) + .withString("deptId", bean.getDepartmentId()) + .navigation(); + } else { + //部门 + DeptDatabaseBean bean = (DeptDatabaseBean) o; + //添加到当前选中的集合中 + mSelDatas.add(bean); + mSelAdapter.setData(mSelDatas); + //获取当前选中的下一级 + mRlvSelDept.scrollToPosition(mSelDatas.size() - 1); + mSelDeptId = bean.getDepartmentId(); + mCsvState.setState(CustomStateView.STATE_LOAD); + mRlvDept.setVisibility(View.GONE); + queryDept(); + } + }); + + mSelAdapter.setOnItemChoose((bean12, pos) -> { + mSelDatas = mSelDatas.subList(0, pos + 1); + mSelAdapter.setData(mSelDatas); + mRlvSelDept.scrollToPosition(mSelDatas.size() - 1); + mSelDeptId = bean12.getDepartmentId(); + mCsvState.setState(CustomStateView.STATE_LOAD); + mRlvDept.setVisibility(View.GONE); + if (pos < mCurrentDeptIndex) { + mKeyword = ""; + mEtBaseSearchCancel.setText(""); + mCurrentDeptIndex = 0; + } + //判断是否在搜索 + if (!TextUtils.isEmpty(mKeyword) && mCurrentDeptIndex == pos) { + queryDeptByKeyword(); + } else { + queryDept(); + } + }); + queryDept(); + mRgType.setOnCheckedChangeListener((group, checkedId) -> { + mKeyword = ""; + mEtBaseSearchCancel.setText(""); + mCurrentDeptIndex = 0; + if (checkedId == R.id.rb_dept) { + //部门 + mLlDept.setVisibility(View.VISIBLE); + mRlvUsers.setVisibility(View.GONE); + queryDept(); + } else if (checkedId == R.id.rb_often) { + //常用联系人 + mLlDept.setVisibility(View.GONE); + mCsvState.setState(CustomStateView.STATE_LOAD); + getUserList(); + } + }); + + mEtBaseSearchCancel.setOnEditorActionListener((v, actionId, event) -> { + LogUtils.e("搜索==" + actionId); + if (actionId == EditorInfo.IME_ACTION_SEARCH) { + mCsvState.setState(CustomStateView.STATE_LOAD); + hideSoftKeyboard(); + mCurrentDeptIndex = mSelDatas.size() - 1; + mEtBaseSearchCancel.clearFocus(); + mKeyword = v.getText().toString(); + if (mRbOften.isChecked()) { + //常用联系人 + getUserListByKeyword(); + } else { + //部门 + queryDeptByKeyword(); + } + return true; + } else { + return false; + } + }); + mTvBaseSearchCancel.setOnClickListener(v -> { + mKeyword = ""; + mCurrentDeptIndex = 0; + mEtBaseSearchCancel.setText(""); + mEtBaseSearchCancel.clearFocus(); + mSearchData.clear(); + if (mRbOften.isChecked()) { + getUserList(); + } else { + queryDept(); + } + }); + + } + + + /** + * 查询部门 + */ + private void queryDept() { + mDatas.clear(); + Observable.create((ObservableOnSubscribe) emitter -> { + try { + if (mDatabase == null) { + mDatabase = AppDatabase.getInstance(mActivity.getApplication()); + mDeptDao = mDatabase.getDeptDao(); + mUserDao = mDatabase.getUserDao(); + } + List beans = mDeptDao.queryByPid(mSelDeptId); + List deptId = mUserDao.getUsersByDeptId(mSelDeptId); + if (beans.size() > 0 || deptId.size() > 0) { + mDatas.addAll(beans); + mDatas.addAll(deptId); + emitter.onNext(1); + } else { + emitter.onNext(2); + } + } catch (Exception e) { + emitter.onError(new Exception("加载失败")); + } + }) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) { + + } + + @Override + public void onNext(@io.reactivex.rxjava3.annotations.NonNull Integer o) { + if (o == 1) { + //有数据 + mRlvDept.setVisibility(View.VISIBLE); + mAdapter.setData(mDatas); + mCsvState.setState(CustomStateView.STATE_SUCCESS); + } else { + //没有数据 + mRlvDept.setVisibility(View.GONE); + mCsvState.setState(CustomStateView.STATE_EMPTY); + } + } + + @Override + public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) { + // 加载失败 + mRlvDept.setVisibility(View.GONE); + mCsvState.setState(CustomStateView.STATE_ERROR); + } + + @Override + public void onComplete() { + + } + }); + } + + + /** + * 根据关键字查询部门 + */ + private void queryDeptByKeyword() { + mDatas.clear(); + Observable.create((ObservableOnSubscribe) emitter -> { + try { + if (mDatabase == null) { + mDatabase = AppDatabase.getInstance(mActivity.getApplication()); + mDeptDao = mDatabase.getDeptDao(); + mUserDao = mDatabase.getUserDao(); + } + List beans = mDeptDao.queryByPidAndKeyWord(mSelDeptId, mKeyword); + List deptId = mUserDao.queryByDeptIdAndKeyWord(mSelDeptId, mKeyword); + if (beans.size() > 0 || deptId.size() > 0) { + mDatas.addAll(beans); + mDatas.addAll(deptId); + emitter.onNext(1); + } else { + emitter.onNext(2); + } + } catch (Exception e) { + emitter.onError(new Exception("加载失败")); + } + }) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) { + + } + + @Override + public void onNext(@io.reactivex.rxjava3.annotations.NonNull Integer o) { + if (o == 1) { + //有数据 + mRlvDept.setVisibility(View.VISIBLE); + mAdapter.setData(mDatas); + mCsvState.setState(CustomStateView.STATE_SUCCESS); + } else { + //没有数据 + mRlvDept.setVisibility(View.GONE); + mCsvState.setState(CustomStateView.STATE_EMPTY); + } + } + + @Override + public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) { + // 加载失败 + mRlvDept.setVisibility(View.GONE); + mCsvState.setState(CustomStateView.STATE_ERROR); + } + + @Override + public void onComplete() { + + } + }); + } + + + /** + * 提示需要同步dialog + */ + private void showSyncDialog() { + AlertDialog.Builder builder = new AlertDialog.Builder(mActivity); + builder.setTitle("提示") + .setMessage("您还未同步通讯录,现在要同步吗?") + .setPositiveButton("确定", (dialog, which) -> { + dialog.dismiss(); + doSyncContact(); + }) + .setNegativeButton("取消", (dialog, which) -> { + refreshView(STATE_LOAD_EMPTY); + dialog.dismiss(); + }) + .create() + .show(); + } + + /** + * 同步通讯录 + */ + private void doSyncContact() { + mDatabase = AppDatabase.getInstance(mActivity); + mUserDao = mDatabase.getUserDao(); + mDeptDao = mDatabase.getDeptDao(); + mDialog = UIUtil.initDialog(mActivity, "同步中..."); + mDialog.show(); + mCount = 0; + doSyncDept(); + doSyncUser(); + } + + /** + * 同步用户 + */ + private void doSyncUser() { + RetrofitManager.getInstance() + .create(OAApi.class) + .getAllUserList() + .compose(RxTransformer.getTransformer()) + .subscribe(new Observer>() { + @Override + public void onSubscribe(@NonNull Disposable d) { + + } + + @Override + public void onNext(@NonNull List userDatabaseBeans) { + mUserDatabaseBeanList = userDatabaseBeans; + ++mCount; + if (mCount == 2) { + insertAll(); + } + } + + @Override + public void onError(@NonNull Throwable e) { + mCount = 0; + mDialog.dismiss(); + refreshView(STATE_LOAD_ERROR); + ToastUtils.show("同步失败,请稍后重试"); + } + + @Override + public void onComplete() { + + } + }); + } + + /** + * 同步组织 + */ + private void doSyncDept() { + RetrofitManager.getInstance() + .create(OAApi.class) + .getAllDeptList() + .compose(RxTransformer.getTransformer()) + .subscribe(new Observer>() { + @Override + public void onSubscribe(@NonNull Disposable d) { + + } + + @Override + public void onNext(@NonNull List deptDatabaseBeans) { + ++mCount; + mDatabaseBeanList = deptDatabaseBeans; + if (mCount == 2) { + insertAll(); + } + } + + @Override + public void onError(@NonNull Throwable e) { + mCount = 0; + refreshView(STATE_LOAD_ERROR); + mDialog.dismiss(); + ToastUtils.show("同步失败,请稍后重试"); + } + + @Override + public void onComplete() { + + } + }); + } + + /** + * 开始同步 + */ + private void insertAll() { + try { + mDatabase.runInTransaction(() -> { + mDeptDao.deleteAll(); + mUserDao.deleteAll(); + mUserDao.insertAll(mUserDatabaseBeanList); + mDeptDao.insertAll(mDatabaseBeanList); + if (mDialog != null && mDialog.isShowing()) { + mDialog.dismiss(); + initViews(); + ToastUtils.show("同步完成"); + UserLgUtils.setIsSync(true); + } + }); + } catch (Exception e) { + e.printStackTrace(); + if (mDialog != null && mDialog.isShowing()) { + mDialog.dismiss(); + refreshView(STATE_LOAD_ERROR); + ToastUtils.show("同步失败,请稍后重试"); + } + } + } + + /** + * 获取常用联系人 + */ + private void getUserList() { + mUserDatas.clear(); + Observable.create(emitter -> { + if (mDatabase == null) { + mDatabase = AppDatabase.getInstance(mActivity.getApplication()); + mUserDao = mDatabase.getUserDao(); + } + mUserDatas.addAll(mUserDao.getAllOftenContact()); + emitter.onNext(""); + }) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) { + + } + + @Override + public void onNext(@io.reactivex.rxjava3.annotations.NonNull Object o) { + if (mUserDatas.size() > 0) { + mCsvState.setState(CustomStateView.STATE_SUCCESS); + mRlvUsers.setVisibility(View.VISIBLE); + mAdapter.setData(mUserDatas); + } else { + mRlvUsers.setVisibility(View.GONE); + mCsvState.setState(CustomStateView.STATE_EMPTY); + } + } + + @Override + public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) { + e.printStackTrace(); + mRlvUsers.setVisibility(View.GONE); + mCsvState.setState(CustomStateView.STATE_ERROR); + } + + @Override + public void onComplete() { + + } + }); + } + + + /** + * 搜索常用联系人 + */ + private void getUserListByKeyword() { + mUserDatas.clear(); + Observable.create(emitter -> { + if (mDatabase == null) { + mDatabase = AppDatabase.getInstance(mActivity.getApplication()); + mUserDao = mDatabase.getUserDao(); + } + mUserDatas.addAll(mUserDao.getOftenContactByKeyword(mKeyword)); + emitter.onNext(""); + }) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(@io.reactivex.rxjava3.annotations.NonNull Disposable d) { + + } + + @Override + public void onNext(@io.reactivex.rxjava3.annotations.NonNull Object o) { + if (mUserDatas.size() > 0) { + mCsvState.setState(CustomStateView.STATE_SUCCESS); + mRlvUsers.setVisibility(View.VISIBLE); + mAdapter.setData(mUserDatas); + } else { + mRlvUsers.setVisibility(View.GONE); + mCsvState.setState(CustomStateView.STATE_EMPTY); + } + } + + @Override + public void onError(@io.reactivex.rxjava3.annotations.NonNull Throwable e) { + e.printStackTrace(); + mRlvUsers.setVisibility(View.GONE); + mCsvState.setState(CustomStateView.STATE_ERROR); + } + + @Override + public void onComplete() { + + } + }); + } + + + @Override + protected void doSearchByTitle() { + + } + + + @Override + protected void onResume() { + super.onResume(); + if (mRbOften.isChecked()) { + if (!TextUtils.isEmpty(mKeyword)) { + getUserListByKeyword(); + } else { + getUserList(); + } + } + } + + @Override + protected void clearSearch() { + + } +} \ No newline at end of file diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/activity/addresslist/AddressUserDetailActivity.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/activity/addresslist/AddressUserDetailActivity.java new file mode 100644 index 0000000..0f34c63 --- /dev/null +++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/activity/addresslist/AddressUserDetailActivity.java @@ -0,0 +1,391 @@ +package com.tenlionsoft.oamodule.activity.addresslist; + +import android.annotation.SuppressLint; +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.net.Uri; +import android.os.Build; +import android.os.Handler; +import android.os.Message; +import android.text.TextUtils; +import android.widget.ImageView; +import android.widget.LinearLayout; +import android.widget.TextView; + +import com.alibaba.android.arouter.facade.annotation.Route; +import com.hjq.toast.ToastUtils; +import com.tenlionsoft.baselib.app.BaseAppContext; +import com.tenlionsoft.baselib.constant.Constant; +import com.tenlionsoft.baselib.constant.ConstantsV2; +import com.tenlionsoft.baselib.constant.PathConfig; +import com.tenlionsoft.baselib.core.beans.DeptDatabaseBean; +import com.tenlionsoft.baselib.core.beans.MessageBean; +import com.tenlionsoft.baselib.core.beans.OftenContactBean; +import com.tenlionsoft.baselib.core.beans.UserDatabaseBean; +import com.tenlionsoft.baselib.core.db.AppDatabase; +import com.tenlionsoft.baselib.core.db.DeptDao; +import com.tenlionsoft.baselib.core.db.OftenContactDao; +import com.tenlionsoft.baselib.core.db.UserDao; +import com.tenlionsoft.baselib.core.widget.base.BaseActivity; +import com.tenlionsoft.baselib.utils.AppUtils; +import com.tenlionsoft.baselib.utils.EncryptedSPTool; +import com.tenlionsoft.oamodule.R; +import com.tenlionsoft.oamodule.R2; + +import java.util.concurrent.TimeUnit; + +import androidx.annotation.RequiresApi; +import butterknife.BindView; +import butterknife.ButterKnife; +import butterknife.Unbinder; +import io.reactivex.rxjava3.android.schedulers.AndroidSchedulers; +import io.reactivex.rxjava3.annotations.NonNull; +import io.reactivex.rxjava3.core.Observable; +import io.reactivex.rxjava3.core.ObservableOnSubscribe; +import io.reactivex.rxjava3.core.Observer; +import io.reactivex.rxjava3.disposables.Disposable; +import io.reactivex.rxjava3.schedulers.Schedulers; + +/** + * 作者: Adam + * 日期: 2021年10月29日10:12:55 + * 邮箱: itgaojian@163.com + * 描述: 通讯录用户详情 + */ +@Route(path = PathConfig.PATH_MODULE_OA_ACTIVITY_ADDRESS_USER_DETAIL) +public class AddressUserDetailActivity extends BaseActivity { + + @BindView(R2.id.iv_user_icon) + ImageView mIvUserIcon; + @BindView(R2.id.tv_user_name) + TextView mTvUserName; + @BindView(R2.id.tv_dept) + TextView mTvDept; + @BindView(R2.id.tv_email) + TextView mTvEmail; + @BindView(R2.id.tv_phone) + TextView mTvPhone; + @BindView(R2.id.tv_dept_dept) + TextView mTvDeptDept; + @BindView(R2.id.tv_dept_phone) + TextView mTvDeptPhone; + @BindView(R2.id.tv_dept_address) + TextView mTvDeptAddress; + @BindView(R2.id.ll_msg) + LinearLayout mLlMsg; + @BindView(R2.id.ll_call) + LinearLayout mLlCall; + @BindView(R2.id.ll_add_contact) + LinearLayout mLlAddContact; + @BindView(R2.id.tv_add_contact) + TextView mTvAddContact; + private Unbinder mBind; + private AppDatabase mDatabase; + private String mId; + private OftenContactDao mOftenContactDao; + private UserDao mUserDao; + private DeptDao mDeptDao; + private OftenContactBean mOftenContactByUserId; + private UserDatabaseBean mUserByUserId; + private String mDeptId; + private DeptDatabaseBean mDeptById; + + + private MsgHandler mMsgHandler; + + @Override + protected int setLayoutId() { + return R.layout.activity_address_user_detail; + } + + + @Override + public void initData() { + mBind = ButterKnife.bind(this); + mTvBaseTitle.setText("联系人详情"); + mId = getIntent().getStringExtra("id"); + mDeptId = getIntent().getStringExtra("deptId"); + Observable.create((ObservableOnSubscribe) emitter -> { + try { + mDatabase = AppDatabase.getInstance(mActivity); + mDeptDao = mDatabase.getDeptDao(); + mUserDao = mDatabase.getUserDao(); + mOftenContactDao = mDatabase.getOftenContactDao(); + mUserByUserId = mUserDao.getUserByUserId(mId); + mDeptById = mDeptDao.getDeptById(mDeptId); + mOftenContactByUserId = mOftenContactDao.getOftenContactByUserId(mId); + emitter.onNext(1); + } catch (Exception e) { + emitter.onError(new Exception("load err")); + } + }) + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Observer() { + @Override + public void onSubscribe(@NonNull Disposable d) { + + } + + @Override + public void onNext(@NonNull Integer integer) { + if (mUserByUserId != null) { + setDataToView(); + } else { + refreshView(STATE_LOAD_EMPTY); + } + } + + @Override + public void onError(@NonNull Throwable e) { + refreshView(STATE_LOAD_ERROR); + } + + @Override + public void onComplete() { + + } + }); + + mLlAddContact.setOnClickListener(v -> { + if (mOftenContactByUserId == null) { + OftenContactBean b = new OftenContactBean(); + b.setUserId(mUserByUserId.getUserId()); + mOftenContactDao.insertUser(b); + mOftenContactByUserId = mOftenContactDao.getOftenContactByUserId(mUserByUserId.getUserId()); + mTvAddContact.setText("移除好友"); + ToastUtils.show("添加成功"); + } else { + //移除常用联系人 + mOftenContactDao.deleteUser(mOftenContactByUserId); + setResult(13); + mOftenContactByUserId = null; + ToastUtils.show("移除成功"); + mTvAddContact.setText("添加好友"); + } + }); + mLlCall.setOnClickListener(v -> { + if (TextUtils.isEmpty(mUserByUserId.getUserPhone())) { + ToastUtils.show("该联系人未录入联系电话"); + } else { + Intent intent = new Intent(Intent.ACTION_DIAL); + Uri data = Uri.parse("tel:" + mUserByUserId.getUserPhone()); + intent.setData(data); + startActivity(intent); + } + }); +// mLlMsg.setOnClickListener(v -> ARouter.getInstance() +// .build(PathConfig.PATH_MODULE_CHAT_CHAT) +// .withString("to", mUserByUserId.getUserId()) +// .withString("toName", mUserByUserId.getUserName()) +// .navigation()); + initViews(); + } + + + private void initViews() { + mMsgHandler = new MsgHandler(); + //语音通话 + + } + + /** + * 发送让对方登录的消息 + */ + private void sendNotifyLogin() { + + } + + + /** + * 构建 + */ + private MessageBean buildMsgBean(String id, String toId, String formId, String formName, int msgType, String msg, int type) { +// MessageBean bean = new MessageBean(); +// String uuid = ""; +// if (!TextUtils.isEmpty(id)) { +// uuid = id; +// } else { +// uuid = UUID.randomUUID().toString(); +// } +// bean.setMsgWhat(System.currentTimeMillis()); +// bean.setId(uuid); +// bean.setTo(toId); +// bean.setFrom(formId); +// bean.setSystem(false); +// bean.setTimestamp(System.currentTimeMillis()); +// bean.setFromName(formName); +// bean.setSendState(MsgTypeStateEnum.MSG_SEND_ING);//发送状态 +// bean.setBody(msg); +// bean.setMsgType(msgType); +// bean.setType(type); + return null; + } + + private void setDataToView() { + refreshView(STATE_LOAD_SUCCESS); + if (mOftenContactByUserId == null) { + //不是常用联系人 + mTvAddContact.setText("添加好友"); + } else { + //是常用联系人 + mTvAddContact.setText("移除好友"); + } + mTvUserName.setText(mUserByUserId.getUserName()); + mTvPhone.setText("联系电话:" + mUserByUserId.getUserPhone()); + mTvEmail.setText("邮箱:" + (TextUtils.isEmpty(mUserByUserId.getUserEmail()) ? "未录入" : mUserByUserId.getUserEmail())); + if (mDeptById != null) { + mTvDeptDept.setText("部门:" + (TextUtils.isEmpty(mDeptById.getDepartmentName()) ? "未录入" : mDeptById.getDepartmentName())); + mTvDept.setText((TextUtils.isEmpty(mDeptById.getDepartmentName()) ? "未录入" : mDeptById.getDepartmentName())); + mTvDeptPhone.setText("部门电话:" + (TextUtils.isEmpty(mDeptById.getDepartmentTel()) ? "未录入" : mDeptById.getDepartmentTel())); + mTvDeptAddress.setText("部门地址:" + (TextUtils.isEmpty(mDeptById.getDepartmentAddress()) ? "未录入" : mDeptById.getDepartmentAddress())); + } + } + + +// /** +// * 注册广播 +// */ +// private void registerRec() { +// sendBroadcast(new Intent(PathConfig.ACTION_UNREGISTER_BROAD)); +// IntentFilter filter = new IntentFilter(); +// mMsgReceiver = new MsgReceiver(); +// filter.addAction(PathConfig.ACTION_MSG_CHAT_REFRESH);//刷新信息状态 +// filter.addAction(PathConfig.ACTION_MSG_SOCKET_FAIL);//socket连接失败 +// filter.addAction(PathConfig.ACTION_NOTIFY_CONTACT_LOGIN_SUCCESS);//对方登录成功 +// filter.addAction(PathConfig.ACTION_NOTIFY_CONTACT_LOGIN_FAIL);//对方登录不成功 +// filter.addAction(PathConfig.ACTION_CALL_OTHER_NO_SUPPORT);//对方手机不支持通话 +// filter.addAction(PathConfig.ACTION_USER_OFFLINE);//用户不在线 +// registerReceiver(mMsgReceiver, filter); +// LocalBroadcast.getInstance().registerBroadcast(this, mActions); +// } + + /** + * 注销广播 + */ +// private void unRegister() { +// sendBroadcast(new Intent(PathConfig.ACTION_REGISTER_BROAD)); +// if (mMsgReceiver != null) { +// unregisterReceiver(mMsgReceiver); +// } +// LocalBroadcast.getInstance().unRegisterBroadcast(this, mActions); +// } + + + public class MsgHandler extends Handler { + @Override + public void handleMessage(@androidx.annotation.NonNull Message msg) { +// int what = msg.what; +// if (10086 == what) { +// //语音视频通话消息 3秒钟对方为返回登录成功消息 定义为登录失败 +// //TODO 对方登录失败 +// ToastUtils.show("对方不在线"); +// if (mDialog != null && mDialog.isShowing()) { +// mDialog.dismiss(); +// } +// } + } + } + + private class MsgReceiver extends BroadcastReceiver { + + @RequiresApi(api = Build.VERSION_CODES.M) + @Override + public void onReceive(Context context, Intent intent) { +// String action = intent.getAction(); +// if (!TextUtils.isEmpty(action)) { +// switch (action) { +// case PathConfig.ACTION_USER_OFFLINE: +// ToastUtils.show("对方不在线,无法通话"); +// int logout = LoginMangerV2.getInstance().logout(); +// LogUtils.e("退出登录" + logout); +// if (mDialog != null && mDialog.isShowing()) { +// mDialog.dismiss(); +// } +// mMsgHandler.removeMessages(10086); +// break; +// case PathConfig.ACTION_NOTIFY_CONTACT_LOGIN_SUCCESS: +// //TODO 对方登录成功,获取返回的号码, 进行拨打电话 +// LogUtils.e("对方登录成功" + System.currentTimeMillis()); +// mToUserPhoneNumber = intent.getStringExtra("number"); +// doCall(); +// break; +// case PathConfig.ACTION_NOTIFY_CONTACT_LOGIN_FAIL://通话时对方登录失败 +// ToastUtils.show("对方不在线,请稍后重试"); +// LoginMangerV2.getInstance().logout(); +// if (mDialog != null && mDialog.isShowing()) { +// mDialog.dismiss(); +// } +// mMsgHandler.removeMessages(10086); +// break; +// case PathConfig.ACTION_CALL_OTHER_NO_SUPPORT://对方手机不支持通话 +// ToastUtils.show("对方手机不支持通话"); +// LoginMangerV2.getInstance().logout(); +// if (mDialog != null && mDialog.isShowing()) { +// mDialog.dismiss(); +// } +// mMsgHandler.removeMessages(10086); +// break; +// case PathConfig.ACTION_MSG_SOCKET_FAIL://Socket连接失败 +// break; +// } +// } + } + } + + + @SuppressLint("CheckResult") + public void dealNoDuration() { + Observable.timer(ConstantsV2.DELAY_MILLIS_600, TimeUnit.MILLISECONDS).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(aLong -> { +// TODO Intent it = new Intent(BaseMvpActivityV2.this, NoDurationActivityV2.class); +// it.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); +// startActivity(it); + EncryptedSPTool.putBoolean(Constant.IS_NO_STREAM_DURATION, false); + }); + } + + + @Override + protected void onPause() { + super.onPause(); + } + + @Override + protected void onResume() { + super.onResume(); + } + + + @Override + protected void clearSearch() { + + } + + @Override + protected void doSearchByTitle() { + + } + + + /** + * 判断socket是否在运行 + */ + private boolean isRunning() { + return AppUtils.isRunningService(getApplicationContext(), getPackageName() + ":local"); + } + + + @Override + protected void onDestroy() { + if (mBind != null) { + mBind.unbind(); + } + if (mMsgHandler != null) { + mMsgHandler.removeCallbacksAndMessages(null); + } + BaseAppContext.getInstance().setUsername(""); + BaseAppContext.getInstance().setOtherUserId(""); + super.onDestroy(); + } +} \ No newline at end of file diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/activity/notify/NoticeDetailActivity.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/activity/notify/NoticeDetailActivity.java index 24b8226..c1577ce 100644 --- a/oamodule/src/main/java/com/tenlionsoft/oamodule/activity/notify/NoticeDetailActivity.java +++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/activity/notify/NoticeDetailActivity.java @@ -181,6 +181,7 @@ public class NoticeDetailActivity extends BaseActivity { super.onPageFinished(view, url); view.getSettings().setBlockNetworkImage(false);//开启页面图片加载 doSaveReadState(); + imgReset(); runOnUiThread(() -> mNswWeb.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT))); } @@ -206,6 +207,20 @@ public class NoticeDetailActivity extends BaseActivity { setFiles(bean.getFileList()); } + /** + * 对图片进行重置大小,宽度就是手机屏幕宽度,高度根据宽度比便自动缩放 + **/ + private void imgReset() { + mNswWeb.loadUrl("javascript:(function(){" + + "var objs = document.getElementsByTagName('img'); " + + "for(var i=0;i (mFieldsList.size() - 1)) { mCurrentSigned = mFieldsList.size() - 1; @@ -833,6 +836,7 @@ public class OaFlowCenterActivity extends BaseActivity { */ @SuppressLint("ClickableViewAccessibility") private void initWebView() { + mCsvWeb.setState(CustomStateView.STATE_LOAD); mWebChromeClient = new WebChromeClient() { @Override public boolean onShowFileChooser(WebView webView, ValueCallback filePathCallback, FileChooserParams fileChooserParams) { @@ -870,6 +874,7 @@ public class OaFlowCenterActivity extends BaseActivity { @Override public void onPageFinished(WebView view, String url) { super.onPageFinished(view, url); + mCsvWeb.setState(CustomStateView.STATE_SUCCESS); LogUtils.e("加载完成"); runOnUiThread(() -> { WebView webView = mWebView.getWebCreator().getWebView(); diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/adapter/DeptChooseAdapter.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/adapter/DeptChooseAdapter.java new file mode 100644 index 0000000..bf21406 --- /dev/null +++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/adapter/DeptChooseAdapter.java @@ -0,0 +1,58 @@ +package com.tenlionsoft.oamodule.adapter; + +import android.content.Context; +import android.graphics.Color; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import com.tenlionsoft.baselib.core.beans.DeptDatabaseBean; +import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter; +import com.tenlionsoft.oamodule.R; +import com.tenlionsoft.oamodule.holder.DeptChooseHolder; + +import java.util.List; + +/** + * 作者: adam + * 日期: 2021/10/28 - 1:56 下午 + * 邮箱: itgaojian@163.com + * 描述: 选择部门 + */ +public class DeptChooseAdapter extends BaseRecyclerAdapter { + + public DeptChooseAdapter(Context ctx, List list) { + super(ctx, list); + } + + @Override + public DeptChooseHolder createHolder(ViewGroup parent, int viewType) { + View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_choose_dept_layout, parent, false); + return new DeptChooseHolder(itemView); + } + + @Override + public void bindHolder(DeptChooseHolder holder, int i) { + DeptDatabaseBean bean = mData.get(i); + holder.mTvName.setText(bean.getDepartmentName()); + if (i == (mData.size() - 1)) { + holder.mIvArrow.setVisibility(View.GONE); + holder.mTvName.setTextColor(Color.parseColor("#1189FF")); + } else { + holder.mIvArrow.setVisibility(View.VISIBLE); + holder.mTvName.setTextColor(Color.BLACK); + } + if (mOnItemChoose != null) { + holder.itemView.setOnClickListener(v -> mOnItemChoose.onItemChoose(bean, i)); + } + } + + private OnItemChoose mOnItemChoose; + + public void setOnItemChoose(OnItemChoose onItemChoose) { + this.mOnItemChoose = onItemChoose; + } + + public interface OnItemChoose { + void onItemChoose(DeptDatabaseBean bean, int pos); + } +} diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/adapter/DeptOrUserAdapter.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/adapter/DeptOrUserAdapter.java new file mode 100644 index 0000000..c7ef628 --- /dev/null +++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/adapter/DeptOrUserAdapter.java @@ -0,0 +1,73 @@ +package com.tenlionsoft.oamodule.adapter; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import com.tenlionsoft.baselib.core.beans.DeptDatabaseBean; +import com.tenlionsoft.baselib.core.beans.UserDatabaseBean; +import com.tenlionsoft.baselib.core.widget.base.BaseRecyclerAdapter; +import com.tenlionsoft.oamodule.R; +import com.tenlionsoft.oamodule.holder.DeptContactHolder; +import com.tenlionsoft.oamodule.holder.UserContactHolder; + +import java.util.List; + +import androidx.recyclerview.widget.RecyclerView; + +/** + * 作者: adam + * 日期: 2021/10/28 - 11:22 上午 + * 邮箱: itgaojian@163.com + * 描述: 联系人或部门列表 + */ +public class DeptOrUserAdapter extends BaseRecyclerAdapter { + + public DeptOrUserAdapter(Context ctx, List list) { + super(ctx, list); + } + + @Override + public RecyclerView.ViewHolder createHolder(ViewGroup parent, int viewType) { + View view; + if (viewType == 1) { + //联系人 + view = LayoutInflater.from(mContext).inflate(R.layout.item_contact_user_layout, parent, false); + return new UserContactHolder(view); + } else { + //部门 + view = LayoutInflater.from(mContext).inflate(R.layout.item_contact_dept_layout, parent, false); + return new DeptContactHolder(view); + } + } + + @Override + public void bindHolder(RecyclerView.ViewHolder viewHolder, int i) { + if (viewHolder instanceof UserContactHolder) { + //联系人 + UserDatabaseBean bean = (UserDatabaseBean) mData.get(i); + UserContactHolder holder = (UserContactHolder) viewHolder; + holder.mTvName.setText(bean.getUserName()); + holder.mTvPhone.setText("联系电话:" + bean.getUserPhone()); + holder.mTvEmail.setText("邮箱:" + bean.getUserEmail()); + } else { + //部门 + DeptDatabaseBean bean = (DeptDatabaseBean) mData.get(i); + DeptContactHolder holder = (DeptContactHolder) viewHolder; + holder.mTvName.setText(bean.getDepartmentName()); + holder.mTvDeptPhone.setText("部门电话:" + bean.getDepartmentTel()); + holder.mTvAddress.setText(bean.getDepartmentAddress()); + } + } + + @Override + public int getItemViewType(int position) { + Object bean = mData.get(position); + if (bean instanceof UserDatabaseBean) { + return 1; + } else { + return 2; + } + } +} diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/MineFragment.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/MineFragment.java index 1565249..bdcf85d 100644 --- a/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/MineFragment.java +++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/MineFragment.java @@ -28,8 +28,13 @@ import com.tenlionsoft.baselib.constant.PathConfig; import com.tenlionsoft.baselib.core.beans.AppTokenUser; import com.tenlionsoft.baselib.core.beans.BaseSuccessBean; import com.tenlionsoft.baselib.core.beans.ChangeUserInfoBean; +import com.tenlionsoft.baselib.core.beans.DeptDatabaseBean; import com.tenlionsoft.baselib.core.beans.LoginUser; +import com.tenlionsoft.baselib.core.beans.UserDatabaseBean; import com.tenlionsoft.baselib.core.beans.UserInfoBean; +import com.tenlionsoft.baselib.core.db.AppDatabase; +import com.tenlionsoft.baselib.core.db.DeptDao; +import com.tenlionsoft.baselib.core.db.UserDao; import com.tenlionsoft.baselib.core.retrofit_net.BaseUrlApi; import com.tenlionsoft.baselib.core.retrofit_net.RetrofitManager; import com.tenlionsoft.baselib.core.retrofit_net.api.BaseApiService; @@ -51,6 +56,7 @@ import com.tenlionsoft.oamodule.net.OAApi; import java.io.File; import java.util.ArrayList; +import java.util.List; import androidx.activity.result.ActivityResultLauncher; import androidx.activity.result.contract.ActivityResultContracts; @@ -108,6 +114,10 @@ public class MineFragment extends BaseFragment { LinearLayout mLlLoginOut; private Unbinder mBind; private String mPicPath; + private AppDatabase mDatabase; + private UserDao mUserDao; + private DeptDao mDeptDao; + private int mCount; private ActivityResultLauncher mLauncher = registerForActivityResult( new ActivityResultContracts.StartActivityForResult(), result -> { @@ -158,6 +168,10 @@ public class MineFragment extends BaseFragment { .navigation());//日常工作 mIvUserIcon.setOnClickListener(v -> changeUserIcon()); + mDatabase = AppDatabase.getInstance(mActivity.getApplication()); + mDeptDao = mDatabase.getDeptDao(); + mUserDao = mDatabase.getUserDao(); + mLlMineDept.setOnClickListener(v -> doSyncContact()); } private void doLoginOut() { @@ -187,10 +201,124 @@ public class MineFragment extends BaseFragment { getShowNum(); } + private List mUserDatabaseBeanList; + private ProgressDialog mDialog; + private List mDatabaseBeanList; + + /** + * 同步通讯录 + */ + private void doSyncContact() { + mDialog = UIUtil.initDialog(mActivity, "同步中..."); + mDialog.show(); + mCount = 0; + doSyncDept(); + doSyncUser(); + } + + /** + * 同步用户 + */ + private void doSyncUser() { + RetrofitManager.getInstance() + .create(OAApi.class) + .getAllUserList() + .compose(RxTransformer.getTransformer()) + .subscribe(new Observer>() { + @Override + public void onSubscribe(@androidx.annotation.NonNull Disposable d) { + + } + + @Override + public void onNext(@androidx.annotation.NonNull List userDatabaseBeans) { + mUserDatabaseBeanList = userDatabaseBeans; + ++mCount; + if (mCount == 2) { + insertAll(); + } + } + + @Override + public void onError(@androidx.annotation.NonNull Throwable e) { + mCount = 0; + mDialog.dismiss(); + ToastUtils.show("同步失败,请稍后重试"); + } + + @Override + public void onComplete() { + + } + }); + } + + /** + * 同步组织 + */ + private void doSyncDept() { + RetrofitManager.getInstance() + .create(OAApi.class) + .getAllDeptList() + .compose(RxTransformer.getTransformer()) + .subscribe(new Observer>() { + @Override + public void onSubscribe(@androidx.annotation.NonNull Disposable d) { + + } + + @Override + public void onNext(@androidx.annotation.NonNull List deptDatabaseBeans) { + ++mCount; + mDatabaseBeanList = deptDatabaseBeans; + if (mCount == 2) { + insertAll(); + } + } + + @Override + public void onError(@androidx.annotation.NonNull Throwable e) { + mCount = 0; + mDialog.dismiss(); + ToastUtils.show("同步失败,请稍后重试"); + } + + @Override + public void onComplete() { + + } + }); + } + + /** + * 开始同步 + */ + private void insertAll() { + try { + mDatabase.runInTransaction(() -> { + mDeptDao.deleteAll(); + mUserDao.deleteAll(); + mUserDao.insertAll(mUserDatabaseBeanList); + mDeptDao.insertAll(mDatabaseBeanList); + if (mDialog != null && mDialog.isShowing()) { + mDialog.dismiss(); + ToastUtils.show("同步完成"); + UserLgUtils.setIsSync(true); + } + }); + } catch (Exception e) { + e.printStackTrace(); + if (mDialog != null && mDialog.isShowing()) { + mDialog.dismiss(); + ToastUtils.show("同步失败,请稍后重试"); + } + } + } + private void getShowNum() { RetrofitManager.getInstance() .create(OAApi.class) - .getMineJoinMeetingList("","","", "1") + .getMineJoinMeetingList("", "", "", "1") .compose(RxTransformer.getTransformer()) .subscribe(new Observer() { @Override diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/OaMainFragment.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/OaMainFragment.java index d7db140..bc20f41 100644 --- a/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/OaMainFragment.java +++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/fragments/OaMainFragment.java @@ -1,13 +1,9 @@ package com.tenlionsoft.oamodule.fragments; import android.app.ProgressDialog; -import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.graphics.drawable.Drawable; -import android.net.Uri; -import android.os.Build; -import android.os.Environment; import android.text.TextUtils; import android.view.View; import android.widget.FrameLayout; @@ -26,6 +22,7 @@ import com.bumptech.glide.request.transition.Transition; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.hjq.toast.ToastUtils; +import com.king.zxing.CaptureActivity; import com.king.zxing.Intents; import com.scwang.smart.refresh.layout.SmartRefreshLayout; import com.tenlionsoft.baselib.constant.PathConfig; @@ -41,7 +38,6 @@ import com.tenlionsoft.baselib.core.widget.base.FunctionTitleNumAdapter; import com.tenlionsoft.baselib.core.widget.views.CustomStateView; import com.tenlionsoft.baselib.utils.ExceptionHandler; import com.tenlionsoft.baselib.utils.LogUtils; -import com.tenlionsoft.baselib.utils.ProvderUtils; import com.tenlionsoft.baselib.utils.UIUtil; import com.tenlionsoft.baselib.utils.UserLgUtils; import com.tenlionsoft.oamodule.R; @@ -55,7 +51,6 @@ import com.tenlionsoft.oamodule.net.OAApi; import org.jetbrains.annotations.NotNull; -import java.io.File; import java.util.ArrayList; import java.util.List; @@ -63,7 +58,6 @@ import androidx.activity.result.ActivityResultLauncher; import androidx.activity.result.contract.ActivityResultContracts; import androidx.annotation.NonNull; import androidx.annotation.Nullable; -import androidx.core.content.FileProvider; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; @@ -202,53 +196,18 @@ public class OaMainFragment extends BaseFragment { .build(PathConfig.PATH_MODULE_OA_ACTIVITY_NOTICE) .navigation());//通知公告更多 mIvScan.setOnClickListener(v -> { - -// PrintManager printManager = (PrintManager) mActivity.getSystemService(Context.PRINT_SERVICE); -// PrintAttributes.Builder builder = new PrintAttributes.Builder(); -// -// String filePath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/2222.pdf"; -// PrintJob jobName = printManager.print("jobName", new MyPrintDocumentAdapter(mActivity, filePath), null); - String s = Environment.getExternalStorageDirectory().getAbsolutePath() + "/create_src.pdf"; - File file = new File(s); - ComponentName comp = new ComponentName("org.cups.android", "org.cups.android.AddPrinterActivity"); - Uri uri; - if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) { - uri = Uri.fromFile(file); - } else { - uri = FileProvider.getUriForFile(mActivity, ProvderUtils.getFileProviderName(mActivity), file); - } - String host = "printer.add"; - String scheme = "printer://"; - LogUtils.e(uri); - String path = scheme + host; - Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(path)); -// intent.setComponent(comp); -// intent.putExtra(Intent.EXTRA_STREAM, uri); -// intent.putExtra(Intent.EXTRA_SUBJECT, file.getName()); -// intent.setType("application/pdf"); - intent.setDataAndType(uri, "application/pdf"); - intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); - startActivity(intent); -// Intent intent = new Intent(mActivity, CaptureActivity.class); -// mLauncher.launch(intent); - }); + Intent intent = new Intent(mActivity, CaptureActivity.class); + mLauncher.launch(intent); + });//扫码 mRlTodo.setOnClickListener(v -> ARouter.getInstance() .build(PathConfig.PATH_MODULE_OA_ACTIVITY_OAFLOW_MINE_TODO) .navigation());//我的待办 -// mRlTodo.setOnClickListener(v -> ARouter.getInstance() -// .build(PathConfig.PATH_MODULE_OA_ACTIVITY_WEB_DEMO) -// .navigation());//我的待办 mRlToRead.setOnClickListener(v -> ARouter.getInstance() .build(PathConfig.PATH_MODULE_OA_ACTIVITY_OAFLOW_MINE_READ) .navigation());//我的待阅 mRlSupervise.setOnClickListener(v -> ARouter.getInstance() - .build(PathConfig.PATH_MODULE_OA_ACTIVITY_OAFLOW_APPLY_FLOW) + .build(PathConfig.PATH_MODULE_OA_ACTIVITY_SUPERVISE) .navigation());//我的督办 - -// PrintHelper helper= new PrintHelper(mActivity); -// helper.setScaleMode(PrintHelper.SCALE_MODE_FIT); -// helper.print } private void doRefresh() { diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/DeptChooseHolder.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/DeptChooseHolder.java new file mode 100644 index 0000000..2c6f5c9 --- /dev/null +++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/DeptChooseHolder.java @@ -0,0 +1,31 @@ +package com.tenlionsoft.oamodule.holder; + +import android.view.View; +import android.widget.ImageView; +import android.widget.TextView; + + +import com.tenlionsoft.oamodule.R; + +import org.jetbrains.annotations.NotNull; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +/** + * 作者: adam + * 日期: 2021/10/28 - 11:18 上午 + * 邮箱: itgaojian@163.com + * 描述: 部门列表 + */ +public class DeptChooseHolder extends RecyclerView.ViewHolder { + public TextView mTvName; + public ImageView mIvArrow; + + public DeptChooseHolder(@NonNull @NotNull View itemView) { + super(itemView); + mTvName = itemView.findViewById(R.id.tv_name); + mIvArrow = itemView.findViewById(R.id.iv_arrow); + + } +} diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/DeptContactHolder.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/DeptContactHolder.java new file mode 100644 index 0000000..8d72035 --- /dev/null +++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/DeptContactHolder.java @@ -0,0 +1,34 @@ +package com.tenlionsoft.oamodule.holder; + +import android.view.View; +import android.widget.ImageView; +import android.widget.TextView; + + +import com.tenlionsoft.oamodule.R; + +import org.jetbrains.annotations.NotNull; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +/** + * 作者: adam + * 日期: 2021/10/28 - 11:18 上午 + * 邮箱: itgaojian@163.com + * 描述: 部门列表 + */ +public class DeptContactHolder extends RecyclerView.ViewHolder { + public ImageView mIvDeptImg; + public TextView mTvName; + public TextView mTvDeptPhone; + public TextView mTvAddress; + + public DeptContactHolder(@NonNull @NotNull View itemView) { + super(itemView); + mIvDeptImg = itemView.findViewById(R.id.iv_dept_img); + mTvName = itemView.findViewById(R.id.tv_name); + mTvDeptPhone = itemView.findViewById(R.id.tv_dept_phone); + mTvAddress = itemView.findViewById(R.id.tv_address); + } +} diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/UserContactHolder.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/UserContactHolder.java new file mode 100644 index 0000000..ff9837a --- /dev/null +++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/holder/UserContactHolder.java @@ -0,0 +1,35 @@ +package com.tenlionsoft.oamodule.holder; + +import android.view.View; +import android.widget.ImageView; +import android.widget.TextView; + + +import com.tenlionsoft.oamodule.R; + +import org.jetbrains.annotations.NotNull; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +/** + * 作者: adam + * 日期: 2021/10/28 - 11:19 上午 + * 邮箱: itgaojian@163.com + * 描述: 联系人列表 + */ +public class UserContactHolder extends RecyclerView.ViewHolder { + public ImageView mIvUserImg; + public TextView mTvName; + public TextView mTvPhone; + public TextView mTvEmail; + + + public UserContactHolder(@NonNull @NotNull View itemView) { + super(itemView); + mIvUserImg = itemView.findViewById(R.id.iv_user_img); + mTvName = itemView.findViewById(R.id.tv_name); + mTvPhone = itemView.findViewById(R.id.tv_phone); + mTvEmail = itemView.findViewById(R.id.tv_email); + } +} diff --git a/oamodule/src/main/java/com/tenlionsoft/oamodule/net/OAApi.java b/oamodule/src/main/java/com/tenlionsoft/oamodule/net/OAApi.java index d1492d2..ed1b3ff 100644 --- a/oamodule/src/main/java/com/tenlionsoft/oamodule/net/OAApi.java +++ b/oamodule/src/main/java/com/tenlionsoft/oamodule/net/OAApi.java @@ -1,7 +1,9 @@ package com.tenlionsoft.oamodule.net; import com.tenlionsoft.baselib.core.beans.BaseSuccessBean; +import com.tenlionsoft.baselib.core.beans.DeptDatabaseBean; import com.tenlionsoft.baselib.core.beans.FuncBean; +import com.tenlionsoft.baselib.core.beans.UserDatabaseBean; import com.tenlionsoft.oamodule.beans.ByCarRecordBean; import com.tenlionsoft.oamodule.beans.ByCarRecordListBean; import com.tenlionsoft.oamodule.beans.BySuperviseListBean; @@ -886,4 +888,19 @@ public interface OAApi { @Headers({"base_url_name:oa", "need_token:true", "Content-Type: application/json", "Accept: application/json"}) @GET("app/oa/count-unread-of-mine") Observable getMineUnReadCount(); + + + /** + * 获取系统组织部门 + */ + @Headers({"Content-Type: application/json", "need_token:true", "Accept: application/json"}) + @GET("app/department/list") + Observable> getAllDeptList(); + + /** + * 获取通讯录用户 + */ + @Headers({"Content-Type: application/json", "need_token:true", "Accept: application/json"}) + @GET("app/department/user/list-with-user") + Observable> getAllUserList(); } diff --git a/oamodule/src/main/res/layout/activity_address_list.xml b/oamodule/src/main/res/layout/activity_address_list.xml new file mode 100644 index 0000000..db2f05f --- /dev/null +++ b/oamodule/src/main/res/layout/activity_address_list.xml @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/oamodule/src/main/res/layout/activity_address_user_detail.xml b/oamodule/src/main/res/layout/activity_address_user_detail.xml new file mode 100644 index 0000000..4fd56f8 --- /dev/null +++ b/oamodule/src/main/res/layout/activity_address_user_detail.xml @@ -0,0 +1,308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/oamodule/src/main/res/layout/activity_oa_flow_center.xml b/oamodule/src/main/res/layout/activity_oa_flow_center.xml index c668b73..b307434 100644 --- a/oamodule/src/main/res/layout/activity_oa_flow_center.xml +++ b/oamodule/src/main/res/layout/activity_oa_flow_center.xml @@ -16,18 +16,33 @@ android:layout_height="wrap_content" android:orientation="vertical"> - + android:layout_height="wrap_content" + android:layout_marginLeft="10dp" + android:layout_marginRight="10dp" + android:background="@drawable/shp_rectangle_white_5" + android:minHeight="250dp"> - + + + + + + @@ -144,8 +159,8 @@ android:id="@+id/ll_control" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginLeft="20dp" - android:layout_marginRight="20dp" + android:layout_marginLeft="10dp" + android:layout_marginRight="10dp" android:orientation="vertical" android:padding="5dp" android:visibility="gone"> diff --git a/oamodule/src/main/res/layout/fragment_mine.xml b/oamodule/src/main/res/layout/fragment_mine.xml index b8c3759..ac3bb66 100644 --- a/oamodule/src/main/res/layout/fragment_mine.xml +++ b/oamodule/src/main/res/layout/fragment_mine.xml @@ -233,7 +233,7 @@ android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_weight="1" - android:text="我的部门" + android:text="同步通讯录" android:textColor="@color/black" android:textSize="@dimen/text_14" /> diff --git a/oamodule/src/main/res/layout/fragment_oa_email.xml b/oamodule/src/main/res/layout/fragment_oa_email.xml index 54ee719..46e1e46 100644 --- a/oamodule/src/main/res/layout/fragment_oa_email.xml +++ b/oamodule/src/main/res/layout/fragment_oa_email.xml @@ -127,7 +127,7 @@ android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_weight="1" - android:text="以发送" + android:text="已发送" android:textColor="@color/black" android:textSize="@dimen/text_14" /> diff --git a/oamodule/src/main/res/layout/fragment_pad_email.xml b/oamodule/src/main/res/layout/fragment_pad_email.xml index cbe452b..85fd4b9 100644 --- a/oamodule/src/main/res/layout/fragment_pad_email.xml +++ b/oamodule/src/main/res/layout/fragment_pad_email.xml @@ -138,7 +138,7 @@ android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_weight="1" - android:text="以发送" + android:text="已发送" android:textColor="@color/black" android:textSize="@dimen/text_14" /> diff --git a/oamodule/src/main/res/layout/item_choose_dept_layout.xml b/oamodule/src/main/res/layout/item_choose_dept_layout.xml new file mode 100644 index 0000000..6bf8d4d --- /dev/null +++ b/oamodule/src/main/res/layout/item_choose_dept_layout.xml @@ -0,0 +1,28 @@ + + + + + + + \ No newline at end of file diff --git a/oamodule/src/main/res/layout/item_contact_dept_layout.xml b/oamodule/src/main/res/layout/item_contact_dept_layout.xml new file mode 100644 index 0000000..aaec921 --- /dev/null +++ b/oamodule/src/main/res/layout/item_contact_dept_layout.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/oamodule/src/main/res/layout/item_contact_user_layout.xml b/oamodule/src/main/res/layout/item_contact_user_layout.xml new file mode 100644 index 0000000..5147b1a --- /dev/null +++ b/oamodule/src/main/res/layout/item_contact_user_layout.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file