├── .gitignore ├── .idea ├── $CACHE_FILE$ ├── assetWizardSettings.xml ├── caches │ ├── build_file_checksums.ser │ └── gradle_models.ser ├── dictionaries ├── encodings.xml ├── gradle.xml ├── inspectionProfiles │ └── Project_Default.xml ├── jarRepositories.xml ├── misc.xml ├── uiDesigner.xml └── vcs.xml ├── 459617193_demand.pdf ├── Application.jpg ├── AttendanceSystem.jks ├── README.md ├── app ├── .gitignore ├── CMakeLists.txt ├── build.gradle ├── libs │ ├── AMap3DMap_7.2.1_AMapSearch_7.1.0_AMapLocation_4.8.0_20200115.jar │ ├── arcsoft_face.jar │ └── arcsoft_image_util.jar ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── lzf │ │ └── attendancesystem │ │ └── ExampleInstrumentedTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── cpp │ │ └── native-lib.cpp │ ├── gen │ │ └── com │ │ │ └── lzf │ │ │ └── attendancesystem │ │ │ ├── BuildConfig.java │ │ │ ├── Manifest.java │ │ │ └── R.java │ ├── ic_launcher-web.png │ ├── java │ │ └── com │ │ │ └── lzf │ │ │ └── attendancesystem │ │ │ ├── ZffApplication.java │ │ │ ├── activity │ │ │ ├── AdminLoginActivity.java │ │ │ ├── AdminMainActivity.java │ │ │ ├── AttendanceActivity.java │ │ │ ├── AttendanceDataExportActivity.java │ │ │ ├── MainActivity.java │ │ │ ├── ModifyAccountActivity.java │ │ │ ├── ModifyEmployeeActivity.java │ │ │ ├── NativeViewActivity.java │ │ │ ├── NewEmployeeActivity.java │ │ │ ├── SetAddressRangeActivity.java │ │ │ ├── SignInActivity.java │ │ │ ├── SignOutActivity.java │ │ │ └── StaffManageActivity.java │ │ │ ├── bean │ │ │ ├── Admin.java │ │ │ ├── Attendance.java │ │ │ ├── AttendanceAddress.java │ │ │ └── Staff.java │ │ │ └── util │ │ │ ├── AppManager.java │ │ │ ├── ArcFaceUtil.java │ │ │ ├── BitmapUtil.java │ │ │ ├── ConfigUtil.java │ │ │ ├── CopyFileToSD.java │ │ │ ├── FileUtil.java │ │ │ ├── ReusableAdapter.java │ │ │ └── ScreenUtils.java │ ├── jniLibs │ │ ├── arm64-v8a │ │ │ ├── libAMapSDK_MAP_v7_2_1.so │ │ │ ├── libarcsoft_face.so │ │ │ ├── libarcsoft_face_engine.so │ │ │ └── libarcsoft_image_util.so │ │ ├── armeabi-v7a │ │ │ ├── libAMapSDK_MAP_v7_2_1.so │ │ │ ├── libarcsoft_face.so │ │ │ ├── libarcsoft_face_engine.so │ │ │ └── libarcsoft_image_util.so │ │ ├── armeabi │ │ │ └── libAMapSDK_MAP_v7_2_1.so │ │ ├── x86 │ │ │ └── libAMapSDK_MAP_v7_2_1.so │ │ └── x86_64 │ │ │ └── libAMapSDK_MAP_v7_2_1.so │ └── res │ │ ├── delete.png │ │ ├── drawable │ │ ├── fa_recognition.xml │ │ ├── ic_add_a_photo_black_24dp.xml │ │ ├── ic_autorenew_black_24dp.xml │ │ ├── ic_location_on_black_24dp.xml │ │ ├── rounded_rectangle.xml │ │ ├── rounded_rectangle_border.xml │ │ └── success.xml │ │ ├── layout │ │ ├── activity_admin_login.xml │ │ ├── activity_admin_main.xml │ │ ├── activity_attendance.xml │ │ ├── activity_attendance_data_export.xml │ │ ├── activity_main.xml │ │ ├── activity_modify_account.xml │ │ ├── activity_modify_employee.xml │ │ ├── activity_native_view.xml │ │ ├── activity_new_employee.xml │ │ ├── activity_set_address_range.xml │ │ ├── activity_sign_in.xml │ │ ├── activity_sign_out.xml │ │ ├── activity_staff_manage.xml │ │ ├── item_native_view.xml │ │ ├── item_sign.xml │ │ └── item_staff_manage.xml │ │ ├── mipmap-hdpi │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ ├── background.png │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ └── ic_launcher.png │ │ └── values │ │ ├── colors.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── lzf │ └── attendancesystem │ └── ExampleUnitTest.java ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── release ├── app-release.aab ├── app-release.apk ├── output.json └── private_key.pepk ├── remark └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /.idea/$CACHE_FILE$: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | AccessibilityLintAndroid 10 | 11 | 12 | ActionScript specificJavaScript 13 | 14 | 15 | Android 16 | 17 | 18 | Ant 19 | 20 | 21 | Batch Applications 22 | 23 | 24 | Bitwise operation issuesJavaScript 25 | 26 | 27 | CFML 28 | 29 | 30 | CSS 31 | 32 | 33 | Class structureJava 34 | 35 | 36 | Code quality toolsCSS 37 | 38 | 39 | Code quality toolsJavaScript 40 | 41 | 42 | Code style issuesJava 43 | 44 | 45 | CodePlugin DevKit 46 | 47 | 48 | CoffeeScript 49 | 50 | 51 | ComplianceLintAndroid 52 | 53 | 54 | Control flow issuesJava 55 | 56 | 57 | CorrectnessLintAndroid 58 | 59 | 60 | Cucumber 61 | 62 | 63 | DOM issuesJavaScript 64 | 65 | 66 | Description filePlugin DevKit 67 | 68 | 69 | Dockerfile 70 | 71 | 72 | EditorConfig 73 | 74 | 75 | Error handlingJava 76 | 77 | 78 | Faces Model 79 | 80 | 81 | Flow type checkerJavaScript 82 | 83 | 84 | FreeMarker 85 | 86 | 87 | General 88 | 89 | 90 | GeneralCoffeeScript 91 | 92 | 93 | GeneralJavaScript 94 | 95 | 96 | Google Web Toolkit 97 | 98 | 99 | GrailsGroovy 100 | 101 | 102 | Groovy 103 | 104 | 105 | HTML 106 | 107 | 108 | Hibernate 109 | 110 | 111 | IconsUsabilityLintAndroid 112 | 113 | 114 | ImportsJava 115 | 116 | 117 | Inheritance issuesJava 118 | 119 | 120 | Internationalization 121 | 122 | 123 | InternationalizationJava 124 | 125 | 126 | InternationalizationLintAndroid 127 | 128 | 129 | Invalid elementsCSS 130 | 131 | 132 | J2ME issuesJava 133 | 134 | 135 | JBoss Seam 136 | 137 | 138 | JSON and JSON5 139 | 140 | 141 | JSP 142 | 143 | 144 | Java 145 | 146 | 147 | Java 11Java language level migration aidsJava 148 | 149 | 150 | Java 8Java language level migration aidsJava 151 | 152 | 153 | Java interop issuesKotlin 154 | 155 | 156 | Java language level migration aidsJava 157 | 158 | 159 | JavaFX 160 | 161 | 162 | JavaScript 163 | 164 | 165 | JavadocJava 166 | 167 | 168 | Kotlin 169 | 170 | 171 | Kotlin Android 172 | 173 | 174 | LintAndroid 175 | 176 | 177 | LintLintAndroid 178 | 179 | 180 | Manifest 181 | 182 | 183 | Markdown 184 | 185 | 186 | MessagesCorrectnessLintAndroid 187 | 188 | 189 | Node.jsJavaScript 190 | 191 | 192 | OSGi 193 | 194 | 195 | OtherGroovy 196 | 197 | 198 | Pages Navigation Model 199 | 200 | 201 | PerformanceLintAndroid 202 | 203 | 204 | Plugin DevKit 205 | 206 | 207 | PortabilityJava 208 | 209 | 210 | Potentially confusing code constructsGroovy 211 | 212 | 213 | Probable bugsJava 214 | 215 | 216 | Probable bugsJavaScript 217 | 218 | 219 | Properties files 220 | 221 | 222 | Properties filesJava 223 | 224 | 225 | RELAX NG 226 | 227 | 228 | RESTful Web Service (JAX-RS) 229 | 230 | 231 | Reactor 232 | 233 | 234 | Resource managementJava 235 | 236 | 237 | SQL 238 | 239 | 240 | Sass/SCSS 241 | 242 | 243 | SecurityJava 244 | 245 | 246 | SecurityLintAndroid 247 | 248 | 249 | SetupSpring CoreSpring 250 | 251 | 252 | Spring 253 | 254 | 255 | Spring BootSpring 256 | 257 | 258 | Spring CoreSpring 259 | 260 | 261 | Struts 262 | 263 | 264 | Struts 2Struts 265 | 266 | 267 | Style issuesKotlin 268 | 269 | 270 | TestNGJava 271 | 272 | 273 | Threading issuesJava 274 | 275 | 276 | TypeScript 277 | 278 | 279 | UI form 280 | 281 | 282 | UsabilityLintAndroid 283 | 284 | 285 | Velocity 286 | 287 | 288 | Verbose or redundant code constructsJava 289 | 290 | 291 | Version control 292 | 293 | 294 | VisibilityJava 295 | 296 | 297 | Web Services 298 | 299 | 300 | XML 301 | 302 | 303 | XMLSpring CoreSpring 304 | 305 | 306 | XPath 307 | 308 | 309 | YAML 310 | 311 | 312 | docker-compose 313 | 314 | 315 | 316 | 317 | 318 | -------------------------------------------------------------------------------- /.idea/assetWizardSettings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 51 | 52 | -------------------------------------------------------------------------------- /.idea/caches/build_file_checksums.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJCoderMJCoder/AttendanceSystem--/1d4692226bd65e35378b7d17bcad962dc4d8c631/.idea/caches/build_file_checksums.ser -------------------------------------------------------------------------------- /.idea/caches/gradle_models.ser: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJCoderMJCoder/AttendanceSystem--/1d4692226bd65e35378b7d17bcad962dc4d8c631/.idea/caches/gradle_models.ser -------------------------------------------------------------------------------- /.idea/dictionaries: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 22 | 23 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | -------------------------------------------------------------------------------- /.idea/jarRepositories.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 14 | 15 | 19 | 20 | 24 | 25 | 29 | 30 | 34 | 35 | 39 | 40 | 44 | 45 | 49 | 50 | 54 | 55 | 59 | 60 | 64 | 65 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/uiDesigner.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /459617193_demand.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJCoderMJCoder/AttendanceSystem--/1d4692226bd65e35378b7d17bcad962dc4d8c631/459617193_demand.pdf -------------------------------------------------------------------------------- /Application.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJCoderMJCoder/AttendanceSystem--/1d4692226bd65e35378b7d17bcad962dc4d8c631/Application.jpg -------------------------------------------------------------------------------- /AttendanceSystem.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJCoderMJCoder/AttendanceSystem--/1d4692226bd65e35378b7d17bcad962dc4d8c631/AttendanceSystem.jks -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## AttendanceSystem-考勤 2 | 3 | [1.2.0源码](https://github.com/MJCoderMJCoder/AttendanceSystem--/tree/versionName%EF%BC%9A1.2.0 "1.2.0源码") 4 | 5 | [1.3.0源码](https://github.com/MJCoderMJCoder/AttendanceSystem--/tree/versionName%EF%BC%9A1.3.0 "1.3.0源码") 6 | 7 | [1.3.2源码](https://github.com/MJCoderMJCoder/AttendanceSystem--/tree/versionName%EF%BC%9A1.3.2 "1.3.2源码") 8 | 9 | ### 国内 10 | 11 | [mailto:598157378@qq.com](mailto:598157378@qq.com) 12 | 13 | ### 国外 14 | 15 | [mailto:MJCoder@outlook.com](mailto:MJCoder@outlook.com) 16 | 17 | ### 管理员初始账号密码 18 | + 账号:admin 19 | + 密码:root 20 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # For more information about using CMake with Android Studio, read the 2 | # documentation: https://d.android.com/studio/projects/add-native-code.html 3 | 4 | # Sets the minimum version of CMake required to build the native library. 5 | 6 | cmake_minimum_required(VERSION 3.4.1) 7 | 8 | # Creates and names a library, sets it as either STATIC 9 | # or SHARED, and provides the relative paths to its source code. 10 | # You can define multiple libraries, and CMake builds them for you. 11 | # Gradle automatically packages shared libraries with your APK. 12 | 13 | add_library( # Sets the name of the library. 14 | native-lib 15 | 16 | # Sets the library as a shared library. 17 | SHARED 18 | 19 | # Provides a relative path to your source file(s). 20 | src/main/cpp/native-lib.cpp ) 21 | 22 | # Searches for a specified prebuilt library and stores the path as a 23 | # variable. Because CMake includes system libraries in the search path by 24 | # default, you only need to specify the name of the public NDK library 25 | # you want to add. CMake verifies that the library exists before 26 | # completing its build. 27 | 28 | find_library( # Sets the name of the path variable. 29 | log-lib 30 | 31 | # Specifies the name of the NDK library that 32 | # you want CMake to locate. 33 | log ) 34 | 35 | # Specifies libraries CMake should link to your target library. You 36 | # can link multiple libraries, such as libraries you define in this 37 | # build script, prebuilt third-party libraries, or system libraries. 38 | 39 | target_link_libraries( # Specifies the target library. 40 | native-lib 41 | 42 | # Links the target library to the log library 43 | # included in the NDK. 44 | ${log-lib} ) -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | apply plugin: 'org.greenrobot.greendao' // apply plugin 3 | 4 | android { 5 | compileSdkVersion 27 6 | defaultConfig { 7 | applicationId "com.lzf.attendancesystem" 8 | minSdkVersion 15 9 | targetSdkVersion 27 10 | versionCode 1 11 | versionName "1.3.2" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | // externalNativeBuild { 14 | // cmake { 15 | // cppFlags "-frtti -fexceptions" 16 | // } 17 | // } 18 | } 19 | buildTypes { 20 | debug { 21 | buildConfigField "boolean", "LOG_DEBUG", "true" // 不显示Log 22 | minifyEnabled true //是否启动混淆 ture:打开 false:关闭 23 | zipAlignEnabled true //ZipAlign优化 24 | shrinkResources true // 资源压缩:移除无用的resource文件 25 | //前一部分代表系统默认的android程序的混淆文件,该文件已经包含了基本的混淆声明,后一个文件是自己的定义混淆文件 26 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 27 | } 28 | release { 29 | buildConfigField "boolean", "LOG_DEBUG", "false" // 不显示Log 30 | minifyEnabled true //是否启动混淆 ture:打开 false:关闭 31 | zipAlignEnabled true //ZipAlign优化 32 | shrinkResources true // 资源压缩:移除无用的resource文件 33 | //前一部分代表系统默认的android程序的混淆文件,该文件已经包含了基本的混淆声明,后一个文件是自己的定义混淆文件 34 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 35 | } 36 | } 37 | // externalNativeBuild { 38 | // cmake { 39 | // path "CMakeLists.txt" 40 | // } 41 | // } 42 | 43 | // splits { 44 | // abi { 45 | // enable true 46 | // reset() 47 | // include 'x86', 'x86_64', 'armeabi-v7a', 'armeabi' 48 | // universalApk false 49 | // } 50 | // } 51 | lintOptions { 52 | // true--所有正式版构建执行规则生成崩溃的lint检查,如果有崩溃问题将停止构建 53 | checkReleaseBuilds false 54 | // true--错误发生后停止gradle构建 55 | abortOnError false 56 | } 57 | } 58 | 59 | greendao { 60 | /** 61 | * schemaVersion:数据库模式的当前版本。通过 * OpenHelpers 类 进行架构版本之间迁移。如果更改实体/数据库架构,则必须增加此值。默认为1。 62 | */ 63 | schemaVersion 2 64 | /** 65 | * daoPackage:生成的DAO,DaoMaster和DaoSession的包名。 默认为源实体的包名称。 66 | */ 67 | //daoPackage "com.lzf.attendancesystem.greendao" 68 | /** 69 | * targetGenDir:指定生成的源文件应该存储的位置。默认为构建目录(build/generated/source/greendao)中生成的源文件夹。 70 | */ 71 | //targetGenDir 'src/main/java' 72 | /** 73 | * generateTests: 设置为true以自动生成单元测试。 74 | */ 75 | //generateTests:true 76 | /** 77 | * targetGenDirTests: 指定生成的单元测试应该存储的基本目录。默认为 src/androidTest/java。 78 | */ 79 | //targetGenDirTest:src/androidTest/java。 80 | } 81 | 82 | dependencies { 83 | implementation fileTree(include: ['*.jar'], dir: 'libs') 84 | implementation 'com.android.support:appcompat-v7:27.1.1' 85 | implementation 'com.android.support.constraint:constraint-layout:1.1.3' 86 | implementation 'com.android.support:design:27.1.1' 87 | testImplementation 'junit:junit:4.12' 88 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 89 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 90 | implementation files('libs/arcsoft_face.jar') 91 | implementation 'org.greenrobot:greendao:3.2.2' 92 | implementation 'com.github.bumptech.glide:glide:4.9.0' 93 | annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0' 94 | implementation 'io.reactivex.rxjava2:rxjava:2.2.6' 95 | implementation 'io.reactivex.rxjava2:rxandroid:2.1.0' 96 | } 97 | 98 | 99 | -------------------------------------------------------------------------------- /app/libs/AMap3DMap_7.2.1_AMapSearch_7.1.0_AMapLocation_4.8.0_20200115.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJCoderMJCoder/AttendanceSystem--/1d4692226bd65e35378b7d17bcad962dc4d8c631/app/libs/AMap3DMap_7.2.1_AMapSearch_7.1.0_AMapLocation_4.8.0_20200115.jar -------------------------------------------------------------------------------- /app/libs/arcsoft_face.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJCoderMJCoder/AttendanceSystem--/1d4692226bd65e35378b7d17bcad962dc4d8c631/app/libs/arcsoft_face.jar -------------------------------------------------------------------------------- /app/libs/arcsoft_image_util.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJCoderMJCoder/AttendanceSystem--/1d4692226bd65e35378b7d17bcad962dc4d8c631/app/libs/arcsoft_image_util.jar -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | 23 | ##---------------Begin: proguard configuration for MJCoder ---------- 24 | #保持 native 方法不被混淆:JNI方法不可混淆,因为这个方法需要和native方法保持一致; 25 | #JNI 调用 Java 方法,需要通过类名和方法名构成的地址形成。 26 | #Java 使用 Native 方法,Native 是C/C++编写的,方法是无法一同混淆的。 27 | -keepclasseswithmembernames class * { 28 | native ; 29 | } 30 | -keep class com.arcsoft.face.** {*;} 31 | ##---------------End: proguard configuration for MJCoder ---------- 32 | 33 | ##---------------Begin: proguard configuration for greenDAO 3 ---------- 34 | -keepclassmembers class * extends org.greenrobot.greendao.AbstractDao { 35 | public static java.lang.String TABLENAME; 36 | } 37 | -keep class **$Properties {*;} 38 | 39 | # If you do not use SQLCipher: 40 | -dontwarn net.sqlcipher.database.** 41 | # If you do not use RxJava: 42 | -dontwarn rx.** 43 | ##---------------End: proguard configuration for greenDAO 3 ---------- 44 | 45 | ##---------------Begin: proguard configuration for Glide ---------- 46 | #ProGuard:Depending on your ProGuard (DexGuard) config and usage, you may need to include the following lines in your proguard.cfg (see the Download and Setup docs page for more details): 47 | -keep public class * implements com.bumptech.glide.module.GlideModule 48 | -keep public class * extends com.bumptech.glide.module.AppGlideModule 49 | -keep public enum com.bumptech.glide.load.ImageHeaderParser$** { 50 | **[] $VALUES; 51 | public *; 52 | } 53 | # for DexGuard only 54 | #-keepresourcexmlelements manifest/application/meta-data@value=GlideModule 55 | ##---------------End: proguard configuration for Glide ---------- 56 | 57 | 58 | ##---------------Begin: proguard configuration for Amap ---------- 59 | # 3D 地图 V5.0.0之前: 60 | -keep class com.amap.api.maps.**{*;} 61 | -keep class com.autonavi.amap.mapcore.*{*;} 62 | -keep class com.amap.api.trace.**{*;} 63 | 64 | # 3D 地图 V5.0.0之后: 65 | -keep class com.amap.api.maps.**{*;} 66 | -keep class com.autonavi.**{*;} 67 | -keep class com.amap.api.trace.**{*;} 68 | 69 | # 定位 70 | -keep class com.amap.api.location.**{*;} 71 | -keep class com.amap.api.fence.**{*;} 72 | -keep class com.loc.**{*;} 73 | -keep class com.autonavi.aps.amapapi.model.**{*;} 74 | 75 | # 搜索 76 | -keep class com.amap.api.services.**{*;} 77 | 78 | # 2D地图 79 | -keep class com.amap.api.maps2d.**{*;} 80 | -keep class com.amap.api.mapcore2d.**{*;} 81 | 82 | # 导航 83 | -keep class com.amap.api.navi.**{*;} 84 | -keep class com.autonavi.**{*;} 85 | ##---------------End: proguard configuration for Amap ---------- -------------------------------------------------------------------------------- /app/src/androidTest/java/com/lzf/attendancesystem/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | @RunWith(AndroidJUnit4.class) 18 | public class ExampleInstrumentedTest { 19 | @Test 20 | public void useAppContext() throws Exception { 21 | // Context of the app under test. 22 | Context appContext = InstrumentationRegistry.getTargetContext(); 23 | 24 | assertEquals("com.lzf.attendancesystem", appContext.getPackageName()); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 28 | 29 | 32 | 35 | 37 | 38 | 39 | 40 | 41 | 50 | 51 | 52 | 53 | 56 | 57 | 58 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 73 | 74 | 77 | 78 | 81 | 82 | 85 | 86 | 89 | 90 | 93 | 94 | 97 | 98 | 103 | 104 | 107 | 108 | 112 | 113 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /app/src/main/cpp/native-lib.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | extern "C" 5 | JNIEXPORT jstring JNICALL 6 | Java_com_lzf_attendancesystem_activity_MainActivity_stringFromJNI( 7 | JNIEnv *env, 8 | jobject /* this */) { 9 | std::string hello = "Hello from C++"; 10 | return env->NewStringUTF(hello.c_str()); 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/gen/com/lzf/attendancesystem/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.lzf.attendancesystem; 4 | 5 | /* This stub is only used by the IDE. It is NOT the BuildConfig class actually packed into the APK */ 6 | public final class BuildConfig { 7 | public final static boolean DEBUG = Boolean.parseBoolean(null); 8 | } -------------------------------------------------------------------------------- /app/src/main/gen/com/lzf/attendancesystem/Manifest.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.lzf.attendancesystem; 4 | 5 | /* This stub is only used by the IDE. It is NOT the Manifest class actually packed into the APK */ 6 | public final class Manifest { 7 | } -------------------------------------------------------------------------------- /app/src/main/gen/com/lzf/attendancesystem/R.java: -------------------------------------------------------------------------------- 1 | /*___Generated_by_IDEA___*/ 2 | 3 | package com.lzf.attendancesystem; 4 | 5 | /* This stub is only used by the IDE. It is NOT the R class actually packed into the APK */ 6 | public final class R { 7 | } -------------------------------------------------------------------------------- /app/src/main/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJCoderMJCoder/AttendanceSystem--/1d4692226bd65e35378b7d17bcad962dc4d8c631/app/src/main/ic_launcher-web.png -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/ZffApplication.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | import android.database.sqlite.SQLiteDatabase; 6 | 7 | import com.arcsoft.face.ErrorInfo; 8 | import com.arcsoft.face.FaceEngine; 9 | import com.lzf.attendancesystem.bean.Admin; 10 | import com.lzf.attendancesystem.bean.DaoMaster; 11 | import com.lzf.attendancesystem.bean.DaoSession; 12 | 13 | import org.greenrobot.greendao.database.Database; 14 | 15 | /** 16 | * Created by MJCoder on 2019-03-14. 17 | */ 18 | 19 | public class ZffApplication extends Application { 20 | 21 | private volatile static FaceEngine faceEngine; 22 | private volatile static DaoSession daoSession; 23 | 24 | /** 25 | * 双检锁/双重校验锁(DCL,即 double-checked locking) 26 | * 是否 Lazy 初始化:是 27 | * 是否多线程安全:是 28 | * 描述:这种方式采用双锁机制,安全且在多线程情况下能保持高性能。 29 | * 30 | * @return FaceEngine 31 | */ 32 | public static FaceEngine getFaceEngine() { 33 | if (faceEngine == null) { 34 | synchronized (FaceEngine.class) { 35 | if (faceEngine == null) { 36 | faceEngine = new FaceEngine(); 37 | } 38 | } 39 | } 40 | return faceEngine; 41 | } 42 | 43 | public static DaoSession getDaoSession(Context context) { 44 | try { 45 | if (daoSession == null) { 46 | synchronized (DaoSession.class) { 47 | if (daoSession == null) { 48 | // do this once, for example in your Application class 49 | //// note: DevOpenHelper is for dev only, use a OpenHelper subclass instead 50 | DaoMaster.OpenHelper helper = new DaoMaster.OpenHelper(context, "ATTENDANCE_SYSTEM_DATABASE.db", null) { 51 | @Override 52 | public void onCreate(Database db) { 53 | // Log.v("Database", "Creating tables for schema version " + DaoMaster.SCHEMA_VERSION); 54 | super.onCreate(db); 55 | } 56 | 57 | @Override 58 | public void onCreate(SQLiteDatabase db) { 59 | // Log.v("SQLiteDatabase", "Creating tables for schema version " + DaoMaster.SCHEMA_VERSION); 60 | super.onCreate(db); 61 | } 62 | 63 | @Override 64 | public void onUpgrade(Database db, int oldVersion, int newVersion) { 65 | // Log.v("Database", "Upgrading schema from version " + oldVersion + " to " + newVersion + " by dropping all tables"); 66 | super.onUpgrade(db, oldVersion, newVersion); 67 | } 68 | 69 | @Override 70 | public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { 71 | // Log.v("SQLiteDatabase", "Upgrading schema from version " + oldVersion + " to " + newVersion + " by dropping all tables"); 72 | super.onUpgrade(db, oldVersion, newVersion); 73 | } 74 | }; 75 | daoSession = new DaoMaster(helper.getWritableDatabase()).newSession(); 76 | daoSession.getAdminDao().insert(new Admin(1, "admin", "root", "纸纷飞", "男", "598157378@qq.com", "18334706003")); 77 | } 78 | } 79 | } 80 | } catch (Exception e) { 81 | e.printStackTrace(); 82 | } 83 | return daoSession; 84 | } 85 | 86 | @Override 87 | public void onCreate() { 88 | super.onCreate(); 89 | getDaoSession(this); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/activity/AdminMainActivity.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.activity; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.view.View; 7 | import android.widget.TextView; 8 | 9 | import com.lzf.attendancesystem.R; 10 | import com.lzf.attendancesystem.ZffApplication; 11 | import com.lzf.attendancesystem.bean.Admin; 12 | import com.lzf.attendancesystem.bean.AdminDao; 13 | 14 | import java.util.List; 15 | 16 | public class AdminMainActivity extends AppCompatActivity { 17 | 18 | @Override 19 | protected void onCreate(Bundle savedInstanceState) { 20 | super.onCreate(savedInstanceState); 21 | setContentView(R.layout.activity_admin_main); 22 | } 23 | 24 | @Override 25 | protected void onResume() { 26 | super.onResume(); 27 | List admins = ZffApplication.getDaoSession(this).getAdminDao().queryBuilder().orderAsc(AdminDao.Properties.AdminId).list(); 28 | if (admins != null && admins.size() > 0) { 29 | Admin admin = admins.get(0); 30 | ((TextView) findViewById(R.id.topTxt)).setText(admin.getAdminName() + "管理员欢迎您!"); 31 | } 32 | } 33 | 34 | public void onClick(View view) { 35 | switch (view.getId()) { 36 | case R.id.systemSetTime: 37 | Intent intent = new Intent(); 38 | intent.setAction("android.settings.DATE_SETTINGS"); 39 | startActivity(intent); 40 | break; 41 | case R.id.setAttendanceAddressRange: 42 | startActivity(new Intent(this, SetAddressRangeActivity.class)); 43 | break; 44 | case R.id.staffManage: 45 | startActivity(new Intent(this, StaffManageActivity.class)); 46 | break; 47 | case R.id.attendanceDataExport: 48 | startActivity(new Intent(this, AttendanceDataExportActivity.class)); 49 | break; 50 | case R.id.attendanceTimeManage: 51 | break; 52 | case R.id.modifyAccountInfo: 53 | startActivity(new Intent(this, ModifyAccountActivity.class)); 54 | break; 55 | default: 56 | break; 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/activity/AttendanceDataExportActivity.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.activity; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.view.View; 7 | import android.widget.Toast; 8 | 9 | import com.lzf.attendancesystem.R; 10 | 11 | public class AttendanceDataExportActivity extends AppCompatActivity { 12 | 13 | @Override 14 | protected void onCreate(Bundle savedInstanceState) { 15 | super.onCreate(savedInstanceState); 16 | setContentView(R.layout.activity_attendance_data_export); 17 | } 18 | 19 | 20 | public void onClick(View view) { 21 | switch (view.getId()) { 22 | case R.id.UExport: 23 | Toast.makeText(this, "未检测到U盘存储设备。", Toast.LENGTH_LONG).show(); 24 | break; 25 | case R.id.nativeView: 26 | startActivity(new Intent(this, NativeViewActivity.class)); 27 | break; 28 | default: 29 | break; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/activity/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.activity; 2 | 3 | import android.Manifest; 4 | import android.content.Intent; 5 | import android.content.pm.PackageManager; 6 | import android.os.Build; 7 | import android.os.Bundle; 8 | import android.support.v4.app.ActivityCompat; 9 | import android.support.v4.content.ContextCompat; 10 | import android.support.v7.app.AppCompatActivity; 11 | import android.util.Log; 12 | import android.view.View; 13 | import android.widget.Toast; 14 | 15 | import com.arcsoft.face.ActiveFileInfo; 16 | import com.arcsoft.face.ErrorInfo; 17 | import com.arcsoft.face.FaceEngine; 18 | import com.arcsoft.face.enums.RuntimeABI; 19 | import com.lzf.attendancesystem.R; 20 | import com.lzf.attendancesystem.ZffApplication; 21 | import com.lzf.attendancesystem.util.ConfigUtil; 22 | import io.reactivex.Observable; 23 | import io.reactivex.ObservableEmitter; 24 | import io.reactivex.ObservableOnSubscribe; 25 | import io.reactivex.Observer; 26 | import io.reactivex.android.schedulers.AndroidSchedulers; 27 | import io.reactivex.disposables.Disposable; 28 | import io.reactivex.schedulers.Schedulers; 29 | 30 | import java.util.ArrayList; 31 | import java.util.List; 32 | 33 | import static com.arcsoft.face.enums.DetectFaceOrientPriority.ASF_OP_ALL_OUT; 34 | 35 | public class MainActivity extends AppCompatActivity { 36 | 37 | // Used to load the 'native-lib' library on application startup. 38 | // static { 39 | // System.loadLibrary("native-lib"); 40 | // } 41 | 42 | /** 43 | * 所请求的一系列权限 44 | */ 45 | private final String[] PERMISSIONS = new String[]{ 46 | Manifest.permission.BLUETOOTH_ADMIN, 47 | Manifest.permission.BLUETOOTH, 48 | Manifest.permission.ACCESS_LOCATION_EXTRA_COMMANDS, 49 | Manifest.permission.CHANGE_WIFI_STATE, 50 | Manifest.permission.ACCESS_WIFI_STATE, 51 | Manifest.permission.ACCESS_NETWORK_STATE, 52 | Manifest.permission.ACCESS_FINE_LOCATION, 53 | Manifest.permission.ACCESS_COARSE_LOCATION, 54 | Manifest.permission.RECORD_AUDIO, 55 | Manifest.permission.CAMERA, 56 | Manifest.permission.WRITE_EXTERNAL_STORAGE, 57 | Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS, 58 | Manifest.permission.MOUNT_FORMAT_FILESYSTEMS, 59 | Manifest.permission.READ_EXTERNAL_STORAGE, 60 | Manifest.permission.WRITE_EXTERNAL_STORAGE, 61 | Manifest.permission.MEDIA_CONTENT_CONTROL, 62 | Manifest.permission.MANAGE_DOCUMENTS, 63 | Manifest.permission.READ_PHONE_STATE, 64 | Manifest.permission.INTERNET}; 65 | 66 | /** 67 | * 声明一个集合,在后面的代码中用来存储用户拒绝授权的一系列权限 68 | */ 69 | private List permissionList = new ArrayList(); 70 | 71 | /** 72 | * 请求权限的编号代码 73 | */ 74 | public final int REQUEST_PERMISSION = 6003; 75 | // public static final int FLAG_HOMEKEY_DISPATCHED = 0x80000000; //需要自己定义标志 76 | 77 | @Override 78 | protected void onCreate(Bundle savedInstanceState) { 79 | super.onCreate(savedInstanceState); 80 | setContentView(R.layout.activity_main); 81 | 82 | // Log.v(stringFromJNI(), stringFromJNI()); 83 | permissionIsGranted(); 84 | } 85 | 86 | public void onClick(final View view) { 87 | Observable.create(new ObservableOnSubscribe() { 88 | @Override 89 | public void subscribe(ObservableEmitter emitter) { 90 | RuntimeABI runtimeABI = FaceEngine.getRuntimeABI(); 91 | Log.i("MJCoder", "subscribe: getRuntimeABI() " + runtimeABI); 92 | int activeCode = FaceEngine.activeOnline(MainActivity.this, "GMZPhEArrLoVVb8gtJ1KydUPRdgK4JkZVXh77WKvGFQD", "2EUD77P6jAr2TpAU372yd26ASB18pEZbeRFnPCsPFZTN"); 93 | emitter.onNext(activeCode); 94 | } 95 | }).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Observer() { 96 | @Override 97 | public void onSubscribe(Disposable d) { 98 | } 99 | 100 | @Override 101 | public void onNext(Integer activeCode) { 102 | if (activeCode == ErrorInfo.MOK) { 103 | //Toast.makeText(MainActivity.this, "激活引擎成功", Toast.LENGTH_SHORT).show(); 104 | ConfigUtil.setFtOrient(MainActivity.this, ASF_OP_ALL_OUT); 105 | switch (view.getId()) { 106 | case R.id.attendance: 107 | startActivity(new Intent(MainActivity.this, AttendanceActivity.class)); 108 | break; 109 | case R.id.adminLogin: 110 | startActivity(new Intent(MainActivity.this, AdminLoginActivity.class)); 111 | break; 112 | default: 113 | break; 114 | } 115 | } else if (activeCode == ErrorInfo.MERR_ASF_ALREADY_ACTIVATED) { 116 | //Toast.makeText(MainActivity.this, "引擎已激活,无需再次激活", Toast.LENGTH_SHORT).show(); 117 | ConfigUtil.setFtOrient(MainActivity.this, ASF_OP_ALL_OUT); 118 | switch (view.getId()) { 119 | case R.id.attendance: 120 | startActivity(new Intent(MainActivity.this, AttendanceActivity.class)); 121 | break; 122 | case R.id.adminLogin: 123 | startActivity(new Intent(MainActivity.this, AdminLoginActivity.class)); 124 | break; 125 | default: 126 | break; 127 | } 128 | } else { 129 | Toast.makeText(MainActivity.this, "引擎激活失败,错误码为:" + activeCode, Toast.LENGTH_LONG).show(); 130 | } 131 | ActiveFileInfo activeFileInfo = new ActiveFileInfo(); 132 | int res = FaceEngine.getActiveFileInfo(MainActivity.this, activeFileInfo); 133 | if (res == ErrorInfo.MOK) { 134 | Log.i("MJCoder", activeFileInfo.toString()); 135 | } 136 | } 137 | 138 | @Override 139 | public void onError(Throwable e) { 140 | Toast.makeText(MainActivity.this, e.getMessage(), Toast.LENGTH_LONG).show(); 141 | } 142 | 143 | @Override 144 | public void onComplete() { 145 | } 146 | }); 147 | } 148 | 149 | /** 150 | * 判断哪些权限未授予以便在必要的时候重新申请 151 | * 判断存储未授予权限的集合permissionList是否为空:未授予的权限为空,表示都授予了 152 | */ 153 | private void permissionIsGranted() { 154 | permissionList.clear(); 155 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { 156 | for (String permission : PERMISSIONS) { 157 | if (ContextCompat.checkSelfPermission(this, permission) != PackageManager.PERMISSION_GRANTED) { //该权限已经授予 158 | //判断是否需要 向用户解释,为什么要申请该权限 159 | ActivityCompat.shouldShowRequestPermissionRationale(this, permission); 160 | permissionList.add(permission); 161 | // Should we show an explanation? 162 | if (ActivityCompat.shouldShowRequestPermissionRationale(this, 163 | permission)) { 164 | Toast.makeText(this, "获取权限失败,请在“设置”-“应用权限”-打开所需权限", Toast.LENGTH_LONG).show(); 165 | } 166 | } 167 | } 168 | if (!permissionList.isEmpty()) { 169 | String[] permissions = new String[permissionList.size()]; 170 | //请求权限 171 | ActivityCompat.requestPermissions(this, permissionList.toArray(permissions), REQUEST_PERMISSION); 172 | } 173 | } 174 | } 175 | 176 | /** 177 | * A native method that is implemented by the 'native-lib' native library, 178 | * which is packaged with this application. 179 | */ 180 | // public native String stringFromJNI(); 181 | } 182 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/activity/ModifyAccountActivity.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.activity; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | import android.view.View; 6 | import android.widget.EditText; 7 | import android.widget.RadioButton; 8 | import android.widget.RadioGroup; 9 | import android.widget.Toast; 10 | 11 | import com.lzf.attendancesystem.R; 12 | import com.lzf.attendancesystem.ZffApplication; 13 | import com.lzf.attendancesystem.bean.Admin; 14 | import com.lzf.attendancesystem.bean.AdminDao; 15 | 16 | import java.util.List; 17 | 18 | public class ModifyAccountActivity extends AppCompatActivity { 19 | private EditText accountEdit; 20 | private String account; 21 | private EditText oldPwdEdit; 22 | private String oldPwd; 23 | private EditText newPwdEdit; 24 | private String newPwd; 25 | private EditText affirmPwdEdit; 26 | private String affirmPwd; 27 | private EditText nameEdit; 28 | private String name; 29 | private EditText emailEdit; 30 | private String email; 31 | private EditText phoneEdit; 32 | private String phone; 33 | private String gender; 34 | 35 | private AdminDao adminDao = ZffApplication.getDaoSession(this).getAdminDao(); 36 | private Admin admin; 37 | 38 | @Override 39 | protected void onCreate(Bundle savedInstanceState) { 40 | super.onCreate(savedInstanceState); 41 | setContentView(R.layout.activity_modify_account); 42 | 43 | List admins = adminDao.queryBuilder().orderAsc(AdminDao.Properties.AdminId).list(); 44 | if (admins != null && admins.size() > 0) { 45 | RadioGroup radioGroup = findViewById(R.id.radioGroup); 46 | radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { 47 | @Override 48 | public void onCheckedChanged(RadioGroup group, int checkedId) { 49 | gender = ((RadioButton) findViewById(checkedId)).getText().toString().trim(); 50 | } 51 | }); 52 | admin = admins.get(0); 53 | account = admin.getAdminAccount(); 54 | oldPwd = admin.getAdminPassword(); 55 | newPwd = admin.getAdminPassword(); 56 | affirmPwd = admin.getAdminPassword(); 57 | name = admin.getAdminName(); 58 | email = admin.getAdminEmail(); 59 | phone = admin.getAdminPhone(); 60 | accountEdit = findViewById(R.id.accountEdit); 61 | accountEdit.setText(account); 62 | oldPwdEdit = findViewById(R.id.oldPwdEdit); 63 | oldPwdEdit.setText(oldPwd); 64 | newPwdEdit = findViewById(R.id.newPwdEdit); 65 | newPwdEdit.setText(newPwd); 66 | affirmPwdEdit = findViewById(R.id.affirmPwdEdit); 67 | affirmPwdEdit.setText(affirmPwd); 68 | nameEdit = findViewById(R.id.nameEdit); 69 | nameEdit.setText(name); 70 | emailEdit = findViewById(R.id.emailEdit); 71 | emailEdit.setText(email); 72 | phoneEdit = findViewById(R.id.phoneEdit); 73 | phoneEdit.setText(phone); 74 | gender = admin.getAdminGender(); 75 | if ("男".equals(gender)) { 76 | findViewById(R.id.man).performClick(); 77 | } else if ("女".equals(gender)) { 78 | findViewById(R.id.woman).performClick(); 79 | } 80 | } else { 81 | Toast.makeText(this, "管理员信息丢失", Toast.LENGTH_SHORT).show(); 82 | finish(); 83 | } 84 | } 85 | 86 | 87 | public void onClick(View view) { 88 | switch (view.getId()) { 89 | case R.id.modify: 90 | try { 91 | account = accountEdit.getText().toString(); 92 | if ("".equals(account)) { 93 | Toast.makeText(this, "请输入账号", Toast.LENGTH_SHORT).show(); 94 | } else { 95 | oldPwd = oldPwdEdit.getText().toString(); 96 | if ("".equals(oldPwd)) { 97 | Toast.makeText(this, "请输入原始密码进行验证", Toast.LENGTH_SHORT).show(); 98 | } else { 99 | if (!oldPwd.equals(admin.getAdminPassword())) { 100 | Toast.makeText(this, "原始密码不正确", Toast.LENGTH_SHORT).show(); 101 | } else { 102 | newPwd = newPwdEdit.getText().toString(); 103 | affirmPwd = affirmPwdEdit.getText().toString(); 104 | if (!affirmPwd.equals(newPwd)) { 105 | Toast.makeText(this, "两次输入的新密码不一致!请重新输入", Toast.LENGTH_LONG).show(); 106 | } else { 107 | name = nameEdit.getText().toString(); 108 | if ("".equals(name)) { 109 | Toast.makeText(this, "请输入姓名", Toast.LENGTH_SHORT).show(); 110 | } else { 111 | email = emailEdit.getText().toString(); 112 | if ("".equals(email)) { 113 | Toast.makeText(this, "请输入邮箱", Toast.LENGTH_SHORT).show(); 114 | } else { 115 | phone = phoneEdit.getText().toString(); 116 | if ("".equals(phone)) { 117 | Toast.makeText(this, "请输入手机号", Toast.LENGTH_SHORT).show(); 118 | } else { 119 | admin.setAdminAccount(account); 120 | admin.setAdminPassword(newPwd); 121 | admin.setAdminName(name); 122 | admin.setAdminEmail(email); 123 | admin.setAdminPhone(phone); 124 | admin.setAdminGender(gender); 125 | adminDao.update(admin); 126 | finish(); 127 | } 128 | } 129 | } 130 | } 131 | } 132 | } 133 | } 134 | } catch (Exception e) { 135 | e.printStackTrace(); 136 | Toast.makeText(this, "修改信息失败:" + e.getMessage(), Toast.LENGTH_SHORT).show(); 137 | } 138 | break; 139 | default: 140 | break; 141 | } 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/activity/NativeViewActivity.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.activity; 2 | 3 | import android.annotation.TargetApi; 4 | import android.os.Build; 5 | import android.os.Bundle; 6 | import android.support.v7.app.AppCompatActivity; 7 | import android.view.View; 8 | import android.widget.CheckBox; 9 | import android.widget.DatePicker; 10 | import android.widget.EditText; 11 | import android.widget.ListView; 12 | import android.widget.Toast; 13 | 14 | import com.amap.api.maps.AMapUtils; 15 | import com.amap.api.maps.model.LatLng; 16 | import com.lzf.attendancesystem.R; 17 | import com.lzf.attendancesystem.ZffApplication; 18 | import com.lzf.attendancesystem.bean.Attendance; 19 | import com.lzf.attendancesystem.bean.AttendanceAddress; 20 | import com.lzf.attendancesystem.bean.AttendanceAddressDao; 21 | import com.lzf.attendancesystem.bean.AttendanceDao; 22 | import com.lzf.attendancesystem.util.ReusableAdapter; 23 | 24 | import org.greenrobot.greendao.query.QueryBuilder; 25 | 26 | import java.text.ParseException; 27 | import java.text.SimpleDateFormat; 28 | import java.util.List; 29 | 30 | public class NativeViewActivity extends AppCompatActivity { 31 | private AttendanceDao attendanceDao = ZffApplication.getDaoSession(this).getAttendanceDao(); 32 | private ReusableAdapter reusableAdapter; 33 | private SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss"); 34 | private List attendanceAddresses = ZffApplication.getDaoSession(this).getAttendanceAddressDao().queryBuilder().orderAsc(AttendanceAddressDao.Properties.AttendanceAddressId).list(); 35 | 36 | private CheckBox staffIDCheck; 37 | private CheckBox startTimeCheck; 38 | private CheckBox endTimeCheck; 39 | private EditText staffIDEdit; 40 | private DatePicker startDatePicker; 41 | private DatePicker endDatePicker; 42 | 43 | @TargetApi(Build.VERSION_CODES.O) 44 | @Override 45 | protected void onCreate(Bundle savedInstanceState) { 46 | super.onCreate(savedInstanceState); 47 | setContentView(R.layout.activity_native_view); 48 | ListView attendanceList = findViewById(R.id.attendanceList); 49 | reusableAdapter = new ReusableAdapter(attendanceDao.queryBuilder().orderDesc(AttendanceDao.Properties.SignInTime).list(), R.layout.item_native_view) { 50 | @Override 51 | public void bindView(ViewHolder holder, Attendance obj) { 52 | holder.setText(R.id.staffId, obj.getStaffId() + ""); 53 | holder.setText(R.id.staffName, obj.getStaffName()); 54 | holder.setText(R.id.staffDepartment, obj.getStaffDepartment()); 55 | if (obj.getSignInTime() > 1000) { 56 | if (attendanceAddresses != null && attendanceAddresses.size() > 0) { 57 | LatLng attendanceAddress = new LatLng(attendanceAddresses.get(0).getLatitude(), attendanceAddresses.get(0).getLongitude()); 58 | if (AMapUtils.calculateLineDistance(attendanceAddress, new LatLng(obj.getSignInLatitude(), obj.getSignInLongitude())) < 1500) { 59 | holder.setText(R.id.signInTime, simpleDateFormat.format(obj.getSignInTime()) + "(正常签到)"); 60 | } else { 61 | holder.setText(R.id.signInTime, simpleDateFormat.format(obj.getSignInTime()) + "(外出签到)"); 62 | } 63 | } else { 64 | holder.setText(R.id.signInTime, simpleDateFormat.format(obj.getSignInTime())); 65 | } 66 | } else { 67 | holder.setText(R.id.signInTime, ""); 68 | } 69 | if (obj.getSignOutTime() > 1000) { 70 | if (attendanceAddresses != null && attendanceAddresses.size() > 0) { 71 | LatLng attendanceAddress = new LatLng(attendanceAddresses.get(0).getLatitude(), attendanceAddresses.get(0).getLongitude()); 72 | if (AMapUtils.calculateLineDistance(attendanceAddress, new LatLng(obj.getSignInLatitude(), obj.getSignInLongitude())) < 1500) { 73 | holder.setText(R.id.signOutTime, simpleDateFormat.format(obj.getSignInTime()) + "(正常签退)"); 74 | } else { 75 | holder.setText(R.id.signOutTime, simpleDateFormat.format(obj.getSignInTime()) + "(外出签退)"); 76 | } 77 | } else { 78 | holder.setText(R.id.signOutTime, simpleDateFormat.format(obj.getSignInTime())); 79 | } 80 | } else { 81 | holder.setText(R.id.signOutTime, ""); 82 | } 83 | } 84 | }; 85 | attendanceList.setAdapter(reusableAdapter); 86 | 87 | staffIDCheck = findViewById(R.id.staffIDCheck); 88 | startTimeCheck = findViewById(R.id.startTimeCheck); 89 | endTimeCheck = findViewById(R.id.endTimeCheck); 90 | staffIDEdit = findViewById(R.id.staffIDEdit); 91 | startDatePicker = findViewById(R.id.startDatePicker); 92 | endDatePicker = findViewById(R.id.endDatePicker); 93 | } 94 | 95 | public void onClick(View view) { 96 | switch (view.getId()) { 97 | case R.id.query: 98 | try { 99 | String staffId = staffIDEdit.getText().toString().trim(); 100 | long startDate = simpleDateFormat.parse(startDatePicker.getYear() + "年" + (startDatePicker.getMonth() + 1) + "月" + startDatePicker.getDayOfMonth() + "日" + " 00:00:00").getTime(); 101 | long endDate = simpleDateFormat.parse(endDatePicker.getYear() + "年" + (endDatePicker.getMonth() + 1) + "月" + endDatePicker.getDayOfMonth() + "日" + " 23:59:59").getTime(); 102 | if (endDate > startDate) { 103 | QueryBuilder queryBuilder = attendanceDao.queryBuilder(); 104 | if (staffIDCheck.isChecked()) { 105 | if (startTimeCheck.isChecked()) { 106 | if (endTimeCheck.isChecked()) { 107 | queryBuilder.where(AttendanceDao.Properties.StaffId.eq(staffId), queryBuilder.or(queryBuilder.and(AttendanceDao.Properties.SignInTime.ge(startDate), AttendanceDao.Properties.SignInTime.le(endDate)), queryBuilder.and(AttendanceDao.Properties.SignOutTime.ge(startDate), AttendanceDao.Properties.SignOutTime.le(endDate)))); 108 | } else { 109 | queryBuilder.where(AttendanceDao.Properties.StaffId.eq(staffId), queryBuilder.or(AttendanceDao.Properties.SignInTime.ge(startDate), AttendanceDao.Properties.SignOutTime.ge(startDate))); 110 | } 111 | } else if (endTimeCheck.isChecked()) { 112 | queryBuilder.where(AttendanceDao.Properties.StaffId.eq(staffId), queryBuilder.or(AttendanceDao.Properties.SignInTime.le(endDate), AttendanceDao.Properties.SignOutTime.le(endDate))); 113 | } else { 114 | queryBuilder.where(AttendanceDao.Properties.StaffId.eq(staffId)); 115 | } 116 | } else if (startTimeCheck.isChecked()) { 117 | if (endTimeCheck.isChecked()) { 118 | queryBuilder.where(queryBuilder.or(queryBuilder.and(AttendanceDao.Properties.SignInTime.ge(startDate), AttendanceDao.Properties.SignInTime.le(endDate)), queryBuilder.and(AttendanceDao.Properties.SignOutTime.ge(startDate), AttendanceDao.Properties.SignOutTime.le(endDate)))); 119 | } else { 120 | queryBuilder.where(queryBuilder.or(AttendanceDao.Properties.SignInTime.ge(startDate), AttendanceDao.Properties.SignOutTime.ge(startDate))); 121 | } 122 | } else if (endTimeCheck.isChecked()) { 123 | queryBuilder.where(queryBuilder.or(AttendanceDao.Properties.SignInTime.le(endDate), AttendanceDao.Properties.SignOutTime.le(endDate))); 124 | } 125 | reusableAdapter.updateAll(queryBuilder.orderDesc(AttendanceDao.Properties.SignInTime).list()); 126 | } else { 127 | Toast.makeText(this, "起始时间不能大于截止时间", Toast.LENGTH_SHORT).show(); 128 | } 129 | } catch (ParseException e) { 130 | e.printStackTrace(); 131 | } 132 | break; 133 | default: 134 | break; 135 | } 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/activity/StaffManageActivity.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.activity; 2 | 3 | import android.content.Intent; 4 | import android.os.Bundle; 5 | import android.support.v7.app.AppCompatActivity; 6 | import android.view.View; 7 | import android.widget.AdapterView; 8 | import android.widget.ListView; 9 | 10 | import com.lzf.attendancesystem.R; 11 | import com.lzf.attendancesystem.ZffApplication; 12 | import com.lzf.attendancesystem.bean.Staff; 13 | import com.lzf.attendancesystem.bean.StaffDao; 14 | import com.lzf.attendancesystem.util.ReusableAdapter; 15 | 16 | public class StaffManageActivity extends AppCompatActivity { 17 | 18 | private StaffDao staffDao = ZffApplication.getDaoSession(this).getStaffDao(); 19 | private ReusableAdapter reusableAdapter; 20 | 21 | @Override 22 | protected void onCreate(Bundle savedInstanceState) { 23 | super.onCreate(savedInstanceState); 24 | setContentView(R.layout.activity_staff_manage); 25 | ListView employeeList = findViewById(R.id.employeeList); 26 | reusableAdapter = new ReusableAdapter(staffDao.queryBuilder().orderAsc(StaffDao.Properties.StaffId).list(), R.layout.item_staff_manage) { 27 | @Override 28 | public void bindView(ViewHolder holder, Staff obj) { 29 | holder.setText(R.id.employeeID, obj.getStaffId() + ""); 30 | holder.setText(R.id.name, obj.getStaffName()); 31 | holder.setText(R.id.gender, obj.getStaffGender()); 32 | holder.setText(R.id.department, obj.getStaffDepartment()); 33 | } 34 | }; 35 | employeeList.setAdapter(reusableAdapter); 36 | employeeList.setOnItemClickListener(new AdapterView.OnItemClickListener() { 37 | @Override 38 | public void onItemClick(AdapterView parent, View view, int position, long id) { 39 | Intent intent = new Intent(StaffManageActivity.this, ModifyEmployeeActivity.class); 40 | intent.putExtra("staff", (Staff) reusableAdapter.getItem(position)); 41 | startActivity(intent); 42 | } 43 | }); 44 | } 45 | 46 | @Override 47 | protected void onResume() { 48 | super.onResume(); 49 | //清除单个DAO的标识​​范围:不要返回“缓存”对象。 50 | staffDao.detachAll(); 51 | reusableAdapter.updateAll(staffDao.queryBuilder().orderAsc(StaffDao.Properties.StaffId).list()); 52 | } 53 | 54 | public void onClick(View view) { 55 | switch (view.getId()) { 56 | case R.id.newEmployee: 57 | startActivity(new Intent(this, NewEmployeeActivity.class)); 58 | break; 59 | default: 60 | break; 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/bean/Admin.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.bean; 2 | 3 | 4 | import org.greenrobot.greendao.annotation.Entity; 5 | import org.greenrobot.greendao.annotation.Generated; 6 | import org.greenrobot.greendao.annotation.Id; 7 | import org.greenrobot.greendao.annotation.Index; 8 | import org.greenrobot.greendao.annotation.NotNull; 9 | import org.greenrobot.greendao.annotation.Property; 10 | import org.greenrobot.greendao.annotation.Transient; 11 | 12 | import java.io.Serializable; 13 | 14 | /** 15 | * 使用注释来定义模式和考勤实体类 16 | * 该@Entity注解打开Java类到数据库支持的实体。这也将指示greenDAO生成必要的代码(例如DAO)。@Entity 注解标记了一个Java类作为greenDAO一个presistable实体。 17 | *

18 | * 数据库端的表和列名称是从实体和属性名称派生的。而不是Java中使用的驼峰案例样式,默认数据库名称是大写的,使用下划线来分隔单词。 19 | * 例如,名为creationDate的属性 将成为数据库列 CREATION_DATE。 20 | */ 21 | @Entity( 22 | // 如果您有多个模式,您可以告诉greenDAO一个实体属于哪个模式(选择任意字符串作为名称)。 23 | // schema = "myschema", 24 | 25 | // 标记使实体“活动”:活动实体具有更新、删除和刷新方法。 26 | // active = true, 27 | 28 | // 指定数据库中表的名称。默认情况下,名称基于实体类名称。 29 | // nameInDb = "AWESOME_USERS", 30 | 31 | // 在这里定义跨越多个列的索引。 32 | // indexes = { 33 | // @Index(value = "name DESC", unique = true) 34 | // }, 35 | 36 | //标记DAO是否应该创建数据库表(默认为true)。如果您有多个实体映射到一个表,或者创建表是在greenDAO之外完成的,则将此设置为false。 37 | // createInDb = false, 38 | 39 | // 是否应该生成all properties构造函数。总是需要一个无args构造函数。 40 | generateConstructors = true, 41 | 42 | // 如果缺少属性的getter和setter,是否应该生成它们。 43 | generateGettersSetters = true 44 | 45 | //Note that multiple schemas are currently not supported when using the Gradle plugin.(https://github.com/greenrobot/greenDAO/issues/356) 46 | // For the time being, continue to use your generator project.(http://greenrobot.org/greendao/documentation/generator/) 47 | ) 48 | public class Admin implements Serializable { 49 | 50 | /** 51 | * 这个@Id注释选择long / Long属性作为实体ID。 在数据库方面,它是主键。 参数autoincrement是一个标志,使ID值不断增加(不重用旧值)。 52 | * 目前,实体必须用 long或 Long属性作为其主键。这是Android和SQLite的推荐做法。要解决这个问题,可以将key属性定义为一个附加属性,但是要为它创建一个惟一的索引 53 | */ 54 | @Id(autoincrement = true) 55 | /** 56 | * 在属性上使用@Index为相应的数据库列创建数据库索引。 使用以下参数进行自定义: 57 | * name:如果你不喜欢greenDAO为索引生成的默认名称,你可以在这里指定你的名字。 58 | * unique:向索引添加UNIQUE约束,强制所有值都是唯一的。 59 | * 这个@Unique注释向数据库列添加唯一约束。注意,SQLite还隐式地为它创建了一个索引。 60 | * 注意:要添加跨越多个属性的索引,请参阅@Entity注释的文档。(http://greenrobot.org/greendao/documentation/modelling-entities/#The_Entity_Annotation) 61 | */ 62 | @Index(unique = true) 63 | /** 64 | * 这个@Property注释允许您定义属性映射到的非默认列名称。 @Property(nameInDb = "USERNAME") 65 | * 如果不存在,greenDAO将以SQL-ish方式使用字段名称(大写,下划线而不是camel情况,例如customName将成为CUSTOM_NAME)。 注意:您当前只能使用内联常量来指定列名。 66 | */ 67 | @Property(nameInDb = "ADMIN_ID") 68 | private long adminId; 69 | /** 70 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 71 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 72 | */ 73 | @NotNull 74 | private String adminAccount; 75 | /** 76 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 77 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 78 | */ 79 | @NotNull 80 | private String adminPassword; 81 | /** 82 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 83 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 84 | */ 85 | @NotNull 86 | private String adminName; 87 | /** 88 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 89 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 90 | */ 91 | @NotNull 92 | private String adminGender; 93 | /** 94 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 95 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 96 | */ 97 | @NotNull 98 | private String adminEmail; 99 | /** 100 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 101 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 102 | */ 103 | @NotNull 104 | private String adminPhone; 105 | /** 106 | * 这个@Transient注释标记要从持久性中排除的属性。 将它们用于临时状态等。或者,您也可以使用Java中的transient关键字。 107 | */ 108 | @Transient 109 | private static final long serialVersionUID = -8997430981657272709L; 110 | 111 | @Generated(hash = 1139986266) 112 | public Admin(long adminId, @NotNull String adminAccount, @NotNull String adminPassword, @NotNull String adminName, @NotNull String adminGender, 113 | @NotNull String adminEmail, @NotNull String adminPhone) { 114 | this.adminId = adminId; 115 | this.adminAccount = adminAccount; 116 | this.adminPassword = adminPassword; 117 | this.adminName = adminName; 118 | this.adminGender = adminGender; 119 | this.adminEmail = adminEmail; 120 | this.adminPhone = adminPhone; 121 | } 122 | 123 | @Generated(hash = 1708792177) 124 | public Admin() { 125 | } 126 | 127 | public long getAdminId() { 128 | return this.adminId; 129 | } 130 | 131 | public void setAdminId(long adminId) { 132 | this.adminId = adminId; 133 | } 134 | 135 | public String getAdminAccount() { 136 | return this.adminAccount; 137 | } 138 | 139 | public void setAdminAccount(String adminAccount) { 140 | this.adminAccount = adminAccount; 141 | } 142 | 143 | public String getAdminPassword() { 144 | return this.adminPassword; 145 | } 146 | 147 | public void setAdminPassword(String adminPassword) { 148 | this.adminPassword = adminPassword; 149 | } 150 | 151 | public String getAdminName() { 152 | return this.adminName; 153 | } 154 | 155 | public void setAdminName(String adminName) { 156 | this.adminName = adminName; 157 | } 158 | 159 | public String getAdminGender() { 160 | return this.adminGender; 161 | } 162 | 163 | public void setAdminGender(String adminGender) { 164 | this.adminGender = adminGender; 165 | } 166 | 167 | public String getAdminEmail() { 168 | return this.adminEmail; 169 | } 170 | 171 | public void setAdminEmail(String adminEmail) { 172 | this.adminEmail = adminEmail; 173 | } 174 | 175 | public String getAdminPhone() { 176 | return this.adminPhone; 177 | } 178 | 179 | public void setAdminPhone(String adminPhone) { 180 | this.adminPhone = adminPhone; 181 | } 182 | } 183 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/bean/Attendance.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.bean; 2 | 3 | 4 | import org.greenrobot.greendao.annotation.Entity; 5 | import org.greenrobot.greendao.annotation.Generated; 6 | import org.greenrobot.greendao.annotation.Id; 7 | import org.greenrobot.greendao.annotation.Index; 8 | import org.greenrobot.greendao.annotation.NotNull; 9 | import org.greenrobot.greendao.annotation.Property; 10 | import org.greenrobot.greendao.annotation.Transient; 11 | 12 | import java.io.Serializable; 13 | 14 | /** 15 | * 使用注释来定义模式和考勤实体类 16 | * 该@Entity注解打开Java类到数据库支持的实体。这也将指示greenDAO生成必要的代码(例如DAO)。@Entity 注解标记了一个Java类作为greenDAO一个presistable实体。 17 | *

18 | * 数据库端的表和列名称是从实体和属性名称派生的。而不是Java中使用的驼峰案例样式,默认数据库名称是大写的,使用下划线来分隔单词。 19 | * 例如,名为creationDate的属性 将成为数据库列 CREATION_DATE。 20 | */ 21 | @Entity( 22 | // 如果您有多个模式,您可以告诉greenDAO一个实体属于哪个模式(选择任意字符串作为名称)。 23 | // schema = "myschema", 24 | 25 | // 标记使实体“活动”:活动实体具有更新、删除和刷新方法。 26 | // active = true, 27 | 28 | // 指定数据库中表的名称。默认情况下,名称基于实体类名称。 29 | // nameInDb = "AWESOME_USERS", 30 | 31 | // 在这里定义跨越多个列的索引。 32 | // indexes = { 33 | // @Index(value = "name DESC", unique = true) 34 | // }, 35 | 36 | //标记DAO是否应该创建数据库表(默认为true)。如果您有多个实体映射到一个表,或者创建表是在greenDAO之外完成的,则将此设置为false。 37 | // createInDb = false, 38 | 39 | // 是否应该生成all properties构造函数。总是需要一个无args构造函数。 40 | generateConstructors = true, 41 | 42 | // 如果缺少属性的getter和setter,是否应该生成它们。 43 | generateGettersSetters = true 44 | 45 | //Note that multiple schemas are currently not supported when using the Gradle plugin.(https://github.com/greenrobot/greenDAO/issues/356) 46 | // For the time being, continue to use your generator project.(http://greenrobot.org/greendao/documentation/generator/) 47 | ) 48 | public class Attendance implements Serializable { 49 | 50 | /** 51 | * 这个@Id注释选择long / Long属性作为实体ID。 在数据库方面,它是主键。 参数autoincrement是一个标志,使ID值不断增加(不重用旧值)。 52 | * 目前,实体必须用 long或 Long属性作为其主键。这是Android和SQLite的推荐做法。要解决这个问题,可以将key属性定义为一个附加属性,但是要为它创建一个惟一的索引 53 | */ 54 | @Id(autoincrement = true) 55 | /** 56 | * 在属性上使用@Index为相应的数据库列创建数据库索引。 使用以下参数进行自定义: 57 | * name:如果你不喜欢greenDAO为索引生成的默认名称,你可以在这里指定你的名字。 58 | * unique:向索引添加UNIQUE约束,强制所有值都是唯一的。 59 | * 这个@Unique注释向数据库列添加唯一约束。注意,SQLite还隐式地为它创建了一个索引。 60 | * 注意:要添加跨越多个属性的索引,请参阅@Entity注释的文档。(http://greenrobot.org/greendao/documentation/modelling-entities/#The_Entity_Annotation) 61 | */ 62 | @Index(unique = true) 63 | /** 64 | * 这个@Property注释允许您定义属性映射到的非默认列名称。 @Property(nameInDb = "USERNAME") 65 | * 如果不存在,greenDAO将以SQL-ish方式使用字段名称(大写,下划线而不是camel情况,例如customName将成为CUSTOM_NAME)。 注意:您当前只能使用内联常量来指定列名。 66 | */ 67 | @Property(nameInDb = "ATTENDANCE_ID") 68 | private long attendanceId; 69 | 70 | /** 71 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 72 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 73 | */ 74 | @NotNull 75 | private long staffId; 76 | /** 77 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 78 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 79 | */ 80 | @NotNull 81 | private String staffName; 82 | /** 83 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 84 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 85 | */ 86 | @NotNull 87 | private String staffDepartment; 88 | /** 89 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 90 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 91 | */ 92 | @NotNull 93 | private long signInTime; 94 | /** 95 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 96 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 97 | */ 98 | @NotNull 99 | private double signInLatitude; 100 | /** 101 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 102 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 103 | */ 104 | @NotNull 105 | private double signInLongitude; 106 | /** 107 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 108 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 109 | */ 110 | @NotNull 111 | private long signOutTime; 112 | /** 113 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 114 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 115 | */ 116 | @NotNull 117 | private double signOutLatitude; 118 | /** 119 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 120 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 121 | */ 122 | @NotNull 123 | private double signOutLongitude; 124 | /** 125 | * 这个@Transient注释标记要从持久性中排除的属性。 将它们用于临时状态等。或者,您也可以使用Java中的transient关键字。 126 | */ 127 | @Transient 128 | private static final long serialVersionUID = -1134974556013000026L; // not persisted 129 | 130 | @Generated(hash = 2099981814) 131 | public Attendance(long attendanceId, long staffId, @NotNull String staffName, @NotNull String staffDepartment, long signInTime, double signInLatitude, 132 | double signInLongitude, long signOutTime, double signOutLatitude, double signOutLongitude) { 133 | this.attendanceId = attendanceId; 134 | this.staffId = staffId; 135 | this.staffName = staffName; 136 | this.staffDepartment = staffDepartment; 137 | this.signInTime = signInTime; 138 | this.signInLatitude = signInLatitude; 139 | this.signInLongitude = signInLongitude; 140 | this.signOutTime = signOutTime; 141 | this.signOutLatitude = signOutLatitude; 142 | this.signOutLongitude = signOutLongitude; 143 | } 144 | 145 | @Generated(hash = 812698609) 146 | public Attendance() { 147 | } 148 | 149 | public long getAttendanceId() { 150 | return this.attendanceId; 151 | } 152 | 153 | public void setAttendanceId(long attendanceId) { 154 | this.attendanceId = attendanceId; 155 | } 156 | 157 | public long getStaffId() { 158 | return this.staffId; 159 | } 160 | 161 | public void setStaffId(long staffId) { 162 | this.staffId = staffId; 163 | } 164 | 165 | public String getStaffName() { 166 | return this.staffName; 167 | } 168 | 169 | public void setStaffName(String staffName) { 170 | this.staffName = staffName; 171 | } 172 | 173 | public String getStaffDepartment() { 174 | return this.staffDepartment; 175 | } 176 | 177 | public void setStaffDepartment(String staffDepartment) { 178 | this.staffDepartment = staffDepartment; 179 | } 180 | 181 | public long getSignInTime() { 182 | return this.signInTime; 183 | } 184 | 185 | public void setSignInTime(long signInTime) { 186 | this.signInTime = signInTime; 187 | } 188 | 189 | public double getSignInLatitude() { 190 | return this.signInLatitude; 191 | } 192 | 193 | public void setSignInLatitude(double signInLatitude) { 194 | this.signInLatitude = signInLatitude; 195 | } 196 | 197 | public double getSignInLongitude() { 198 | return this.signInLongitude; 199 | } 200 | 201 | public void setSignInLongitude(double signInLongitude) { 202 | this.signInLongitude = signInLongitude; 203 | } 204 | 205 | public long getSignOutTime() { 206 | return this.signOutTime; 207 | } 208 | 209 | public void setSignOutTime(long signOutTime) { 210 | this.signOutTime = signOutTime; 211 | } 212 | 213 | public double getSignOutLatitude() { 214 | return this.signOutLatitude; 215 | } 216 | 217 | public void setSignOutLatitude(double signOutLatitude) { 218 | this.signOutLatitude = signOutLatitude; 219 | } 220 | 221 | public double getSignOutLongitude() { 222 | return this.signOutLongitude; 223 | } 224 | 225 | public void setSignOutLongitude(double signOutLongitude) { 226 | this.signOutLongitude = signOutLongitude; 227 | } 228 | 229 | } 230 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/bean/AttendanceAddress.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.bean; 2 | 3 | 4 | import org.greenrobot.greendao.annotation.*; 5 | 6 | import java.io.Serializable; 7 | 8 | /** 9 | * 使用注释来定义模式和考勤实体类 10 | * 该@Entity注解打开Java类到数据库支持的实体。这也将指示greenDAO生成必要的代码(例如DAO)。@Entity 注解标记了一个Java类作为greenDAO一个presistable实体。 11 | *

12 | * 数据库端的表和列名称是从实体和属性名称派生的。而不是Java中使用的驼峰案例样式,默认数据库名称是大写的,使用下划线来分隔单词。 13 | * 例如,名为creationDate的属性 将成为数据库列 CREATION_DATE。 14 | */ 15 | @Entity( 16 | // 如果您有多个模式,您可以告诉greenDAO一个实体属于哪个模式(选择任意字符串作为名称)。 17 | // schema = "myschema", 18 | 19 | // 标记使实体“活动”:活动实体具有更新、删除和刷新方法。 20 | // active = true, 21 | 22 | // 指定数据库中表的名称。默认情况下,名称基于实体类名称。 23 | // nameInDb = "AWESOME_USERS", 24 | 25 | // 在这里定义跨越多个列的索引。 26 | // indexes = { 27 | // @Index(value = "name DESC", unique = true) 28 | // }, 29 | 30 | //标记DAO是否应该创建数据库表(默认为true)。如果您有多个实体映射到一个表,或者创建表是在greenDAO之外完成的,则将此设置为false。 31 | // createInDb = false, 32 | 33 | // 是否应该生成all properties构造函数。总是需要一个无args构造函数。 34 | generateConstructors = true, 35 | 36 | // 如果缺少属性的getter和setter,是否应该生成它们。 37 | generateGettersSetters = true 38 | 39 | //Note that multiple schemas are currently not supported when using the Gradle plugin.(https://github.com/greenrobot/greenDAO/issues/356) 40 | // For the time being, continue to use your generator project.(http://greenrobot.org/greendao/documentation/generator/) 41 | ) 42 | public class AttendanceAddress implements Serializable { 43 | /** 44 | * 这个@Id注释选择long / Long属性作为实体ID。 在数据库方面,它是主键。 参数autoincrement是一个标志,使ID值不断增加(不重用旧值)。 45 | * 目前,实体必须用 long或 Long属性作为其主键。这是Android和SQLite的推荐做法。要解决这个问题,可以将key属性定义为一个附加属性,但是要为它创建一个惟一的索引 46 | */ 47 | @Id(autoincrement = true) 48 | /** 49 | * 在属性上使用@Index为相应的数据库列创建数据库索引。 使用以下参数进行自定义: 50 | * name:如果你不喜欢greenDAO为索引生成的默认名称,你可以在这里指定你的名字。 51 | * unique:向索引添加UNIQUE约束,强制所有值都是唯一的。 52 | * 这个@Unique注释向数据库列添加唯一约束。注意,SQLite还隐式地为它创建了一个索引。 53 | * 注意:要添加跨越多个属性的索引,请参阅@Entity注释的文档。(http://greenrobot.org/greendao/documentation/modelling-entities/#The_Entity_Annotation) 54 | */ 55 | @Index(unique = true) 56 | /** 57 | * 这个@Property注释允许您定义属性映射到的非默认列名称。 @Property(nameInDb = "USERNAME") 58 | * 如果不存在,greenDAO将以SQL-ish方式使用字段名称(大写,下划线而不是camel情况,例如customName将成为CUSTOM_NAME)。 注意:您当前只能使用内联常量来指定列名。 59 | */ 60 | @Property(nameInDb = "ATTENDANCE_ADDRESS_ID") 61 | private long attendanceAddressId; 62 | /** 63 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 64 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 65 | */ 66 | @NotNull 67 | private double latitude; 68 | /** 69 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 70 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 71 | */ 72 | @NotNull 73 | private double longitude; 74 | /** 75 | * 这个@Transient注释标记要从持久性中排除的属性。 将它们用于临时状态等。或者,您也可以使用Java中的transient关键字。 76 | */ 77 | @Transient 78 | private static final long serialVersionUID = 6943697476627540544L; 79 | 80 | @Generated(hash = 1189626702) 81 | public AttendanceAddress(long attendanceAddressId, double latitude, double longitude) { 82 | this.attendanceAddressId = attendanceAddressId; 83 | this.latitude = latitude; 84 | this.longitude = longitude; 85 | } 86 | 87 | @Generated(hash = 301105554) 88 | public AttendanceAddress() { 89 | } 90 | 91 | public long getAttendanceAddressId() { 92 | return this.attendanceAddressId; 93 | } 94 | 95 | public void setAttendanceAddressId(long attendanceAddressId) { 96 | this.attendanceAddressId = attendanceAddressId; 97 | } 98 | 99 | public double getLatitude() { 100 | return this.latitude; 101 | } 102 | 103 | public void setLatitude(double latitude) { 104 | this.latitude = latitude; 105 | } 106 | 107 | public double getLongitude() { 108 | return this.longitude; 109 | } 110 | 111 | public void setLongitude(double longitude) { 112 | this.longitude = longitude; 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/bean/Staff.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.bean; 2 | 3 | import org.greenrobot.greendao.annotation.Entity; 4 | import org.greenrobot.greendao.annotation.Generated; 5 | import org.greenrobot.greendao.annotation.Id; 6 | import org.greenrobot.greendao.annotation.Index; 7 | import org.greenrobot.greendao.annotation.NotNull; 8 | import org.greenrobot.greendao.annotation.Property; 9 | import org.greenrobot.greendao.annotation.Transient; 10 | 11 | import java.io.Serializable; 12 | 13 | /** 14 | * 使用注释来定义模式和员工实体类 15 | * 该@Entity注解打开Java类到数据库支持的实体。这也将指示greenDAO生成必要的代码(例如DAO)。@Entity 注解标记了一个Java类作为greenDAO一个presistable实体。 16 | *

17 | * 数据库端的表和列名称是从实体和属性名称派生的。而不是Java中使用的驼峰案例样式,默认数据库名称是大写的,使用下划线来分隔单词。 18 | * 例如,名为creationDate的属性 将成为数据库列 CREATION_DATE。 19 | */ 20 | @Entity( 21 | // 如果您有多个模式,您可以告诉greenDAO一个实体属于哪个模式(选择任意字符串作为名称)。 22 | // schema = "myschema", 23 | 24 | // 标记使实体“活动”:活动实体具有更新、删除和刷新方法。 25 | // active = true, 26 | 27 | // 指定数据库中表的名称。默认情况下,名称基于实体类名称。 28 | // nameInDb = "AWESOME_USERS", 29 | 30 | // 在这里定义跨越多个列的索引。 31 | // indexes = { 32 | // @Index(value = "name DESC", unique = true) 33 | // }, 34 | 35 | //标记DAO是否应该创建数据库表(默认为true)。如果您有多个实体映射到一个表,或者创建表是在greenDAO之外完成的,则将此设置为false。 36 | // createInDb = false, 37 | 38 | // 是否应该生成all properties构造函数。总是需要一个无args构造函数。 39 | generateConstructors = true, 40 | 41 | // 如果缺少属性的getter和setter,是否应该生成它们。 42 | generateGettersSetters = true 43 | 44 | //Note that multiple schemas are currently not supported when using the Gradle plugin.(https://github.com/greenrobot/greenDAO/issues/356) 45 | // For the time being, continue to use your generator project.(http://greenrobot.org/greendao/documentation/generator/) 46 | ) 47 | public class Staff implements Serializable { 48 | /** 49 | * 这个@Id注释选择long / Long属性作为实体ID。 在数据库方面,它是主键。 参数autoincrement是一个标志,使ID值不断增加(不重用旧值)。 50 | * 目前,实体必须用 long或 Long属性作为其主键。这是Android和SQLite的推荐做法。要解决这个问题,可以将key属性定义为一个附加属性,但是要为它创建一个惟一的索引 51 | */ 52 | @Id(autoincrement = true) 53 | /** 54 | * 在属性上使用@Index为相应的数据库列创建数据库索引。 使用以下参数进行自定义: 55 | * name:如果你不喜欢greenDAO为索引生成的默认名称,你可以在这里指定你的名字。 56 | * unique:向索引添加UNIQUE约束,强制所有值都是唯一的。 57 | * 这个@Unique注释向数据库列添加唯一约束。注意,SQLite还隐式地为它创建了一个索引。 58 | * 注意:要添加跨越多个属性的索引,请参阅@Entity注释的文档。(http://greenrobot.org/greendao/documentation/modelling-entities/#The_Entity_Annotation) 59 | */ 60 | @Index(unique = true) 61 | /** 62 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 63 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 64 | */ 65 | @NotNull 66 | /** 67 | * 这个@Property注释允许您定义属性映射到的非默认列名称。 @Property(nameInDb = "USERNAME") 68 | * 如果不存在,greenDAO将以SQL-ish方式使用字段名称(大写,下划线而不是camel情况,例如customName将成为CUSTOM_NAME)。 注意:您当前只能使用内联常量来指定列名。 69 | */ 70 | @Property(nameInDb = "STAFF_ID") 71 | private long staffId; 72 | /** 73 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 74 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 75 | */ 76 | @NotNull 77 | private String staffName; 78 | /** 79 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 80 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 81 | */ 82 | @NotNull 83 | private String staffGender; 84 | /** 85 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 86 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 87 | */ 88 | @NotNull 89 | private String staffDepartment; 90 | /** 91 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 92 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 93 | */ 94 | @NotNull 95 | private String staffFaceOne; 96 | @NotNull 97 | private byte[] staffFaceOneFeatureData; 98 | /** 99 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 100 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 101 | */ 102 | @NotNull 103 | private String staffFaceTwo; 104 | @NotNull 105 | private byte[] staffFaceTwoFeatureData; 106 | /** 107 | * 这个@NotNull注释使该属性成为数据库端的“NOT NULL”列。 108 | * 通常使用@NotNull标记基本类型(long,int,short,byte)是有意义的,同时使用包装类(Long,Integer,Short,Byte)具有可空值。 109 | */ 110 | @NotNull 111 | private String staffFaceThree; 112 | @NotNull 113 | private byte[] staffFaceThreeFeatureData; 114 | /** 115 | * 这个@Transient注释标记要从持久性中排除的属性。 将它们用于临时状态等。或者,您也可以使用Java中的transient关键字。 116 | */ 117 | @Transient 118 | private static final long serialVersionUID = 769026186178017624L; // not persisted 119 | 120 | @Generated(hash = 2117539648) 121 | public Staff(long staffId, @NotNull String staffName, @NotNull String staffGender, @NotNull String staffDepartment, @NotNull String staffFaceOne, 122 | @NotNull byte[] staffFaceOneFeatureData, @NotNull String staffFaceTwo, @NotNull byte[] staffFaceTwoFeatureData, 123 | @NotNull String staffFaceThree, @NotNull byte[] staffFaceThreeFeatureData) { 124 | this.staffId = staffId; 125 | this.staffName = staffName; 126 | this.staffGender = staffGender; 127 | this.staffDepartment = staffDepartment; 128 | this.staffFaceOne = staffFaceOne; 129 | this.staffFaceOneFeatureData = staffFaceOneFeatureData; 130 | this.staffFaceTwo = staffFaceTwo; 131 | this.staffFaceTwoFeatureData = staffFaceTwoFeatureData; 132 | this.staffFaceThree = staffFaceThree; 133 | this.staffFaceThreeFeatureData = staffFaceThreeFeatureData; 134 | } 135 | 136 | @Generated(hash = 1774984890) 137 | public Staff() { 138 | } 139 | 140 | public long getStaffId() { 141 | return this.staffId; 142 | } 143 | 144 | public void setStaffId(long staffId) { 145 | this.staffId = staffId; 146 | } 147 | 148 | public String getStaffName() { 149 | return this.staffName; 150 | } 151 | 152 | public void setStaffName(String staffName) { 153 | this.staffName = staffName; 154 | } 155 | 156 | public String getStaffGender() { 157 | return this.staffGender; 158 | } 159 | 160 | public void setStaffGender(String staffGender) { 161 | this.staffGender = staffGender; 162 | } 163 | 164 | public String getStaffDepartment() { 165 | return this.staffDepartment; 166 | } 167 | 168 | public void setStaffDepartment(String staffDepartment) { 169 | this.staffDepartment = staffDepartment; 170 | } 171 | 172 | public String getStaffFaceOne() { 173 | return this.staffFaceOne; 174 | } 175 | 176 | public void setStaffFaceOne(String staffFaceOne) { 177 | this.staffFaceOne = staffFaceOne; 178 | } 179 | 180 | public byte[] getStaffFaceOneFeatureData() { 181 | return this.staffFaceOneFeatureData; 182 | } 183 | 184 | public void setStaffFaceOneFeatureData(byte[] staffFaceOneFeatureData) { 185 | this.staffFaceOneFeatureData = staffFaceOneFeatureData; 186 | } 187 | 188 | public String getStaffFaceTwo() { 189 | return this.staffFaceTwo; 190 | } 191 | 192 | public void setStaffFaceTwo(String staffFaceTwo) { 193 | this.staffFaceTwo = staffFaceTwo; 194 | } 195 | 196 | public byte[] getStaffFaceTwoFeatureData() { 197 | return this.staffFaceTwoFeatureData; 198 | } 199 | 200 | public void setStaffFaceTwoFeatureData(byte[] staffFaceTwoFeatureData) { 201 | this.staffFaceTwoFeatureData = staffFaceTwoFeatureData; 202 | } 203 | 204 | public String getStaffFaceThree() { 205 | return this.staffFaceThree; 206 | } 207 | 208 | public void setStaffFaceThree(String staffFaceThree) { 209 | this.staffFaceThree = staffFaceThree; 210 | } 211 | 212 | public byte[] getStaffFaceThreeFeatureData() { 213 | return this.staffFaceThreeFeatureData; 214 | } 215 | 216 | public void setStaffFaceThreeFeatureData(byte[] staffFaceThreeFeatureData) { 217 | this.staffFaceThreeFeatureData = staffFaceThreeFeatureData; 218 | } 219 | 220 | 221 | } 222 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/util/AppManager.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.util; 2 | 3 | import android.app.Activity; 4 | import android.app.ActivityManager; 5 | import android.content.Context; 6 | import android.support.v7.app.AppCompatActivity; 7 | 8 | import java.util.Stack; 9 | 10 | /** 11 | * Created by MJCoder on 2019-03-04. 12 | */ 13 | 14 | public class AppManager { 15 | private static Stack activityStack = new Stack(); 16 | 17 | /** 18 | * 添加Activity到堆栈 19 | */ 20 | public static void addActivity(AppCompatActivity activity) { 21 | activityStack.add(activity); 22 | } 23 | 24 | /** 25 | * 获取当前Activity(堆栈中最后一个压入的) 26 | */ 27 | public static Activity currentActivity() { 28 | AppCompatActivity activity = activityStack.lastElement(); 29 | return activity; 30 | } 31 | 32 | /** 33 | * 结束当前Activity(堆栈中最后一个压入的) 34 | */ 35 | public static void finishActivity() { 36 | AppCompatActivity activity = activityStack.lastElement(); 37 | finishActivity(activity); 38 | } 39 | 40 | /** 41 | * 结束指定的Activity 42 | */ 43 | public static void finishActivity(AppCompatActivity activity) { 44 | if (activity != null) { 45 | activityStack.remove(activity); 46 | activity.finish(); 47 | activity = null; 48 | } 49 | } 50 | 51 | /** 52 | * 结束指定类名的Activity 53 | */ 54 | public static void finishActivity(Class cls) { 55 | for (AppCompatActivity activity : activityStack) { 56 | if (activity.getClass().equals(cls)) { 57 | finishActivity(activity); 58 | break; 59 | } 60 | } 61 | } 62 | 63 | /** 64 | * 结束所有Activity 65 | */ 66 | public static void finishAllActivity() { 67 | for (int i = 0, size = activityStack.size(); i < size; i++) { 68 | if (null != activityStack.get(i)) { 69 | activityStack.get(i).finish(); 70 | } 71 | } 72 | activityStack.clear(); 73 | } 74 | 75 | /** 76 | * 退出应用程序 77 | */ 78 | public static void AppExit(Context context) { 79 | try { 80 | finishAllActivity(); 81 | ActivityManager activityMgr = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); 82 | activityMgr.restartPackage(context.getPackageName()); 83 | System.exit(0); 84 | } catch (Exception e) { 85 | e.printStackTrace(); 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/util/ArcFaceUtil.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.util; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | import java.nio.ByteBuffer; 6 | 7 | /** 8 | * Created by MJCoder on 2019-03-14. 9 | */ 10 | public class ArcFaceUtil { 11 | 12 | /** 13 | * Bitmap转化为ARGB数据,再转化为NV21数据 14 | * 15 | * @param src 传入的Bitmap,格式为{@link Bitmap.Config#ARGB_8888} 16 | * @param width NV21图像的宽度 17 | * @param height NV21图像的高度 18 | * @return nv21数据 19 | */ 20 | public static byte[] bitmapToNv21(Bitmap src, int width, int height) { 21 | if (src != null && src.getWidth() >= width && src.getHeight() >= height) { 22 | int[] argb = new int[width * height]; 23 | src.getPixels(argb, 0, width, 0, 0, width, height); 24 | return argbToNv21(argb, width, height); 25 | } else { 26 | return null; 27 | } 28 | } 29 | 30 | /** 31 | * ARGB数据转化为NV21数据 32 | * 33 | * @param argb argb数据 34 | * @param width 宽度 35 | * @param height 高度 36 | * @return nv21数据 37 | */ 38 | private static byte[] argbToNv21(int[] argb, int width, int height) { 39 | int frameSize = width * height; 40 | int yIndex = 0; 41 | int uvIndex = frameSize; 42 | int index = 0; 43 | byte[] nv21 = new byte[width * height * 3 / 2]; 44 | for (int j = 0; j < height; ++j) { 45 | for (int i = 0; i < width; ++i) { 46 | int R = (argb[index] & 0xFF0000) >> 16; 47 | int G = (argb[index] & 0x00FF00) >> 8; 48 | int B = argb[index] & 0x0000FF; 49 | int Y = (66 * R + 129 * G + 25 * B + 128 >> 8) + 16; 50 | int U = (-38 * R - 74 * G + 112 * B + 128 >> 8) + 128; 51 | int V = (112 * R - 94 * G - 18 * B + 128 >> 8) + 128; 52 | nv21[yIndex++] = (byte) (Y < 0 ? 0 : (Y > 255 ? 255 : Y)); 53 | if (j % 2 == 0 && index % 2 == 0 && uvIndex < nv21.length - 2) { 54 | nv21[uvIndex++] = (byte) (V < 0 ? 0 : (V > 255 ? 255 : V)); 55 | nv21[uvIndex++] = (byte) (U < 0 ? 0 : (U > 255 ? 255 : U)); 56 | } 57 | 58 | ++index; 59 | } 60 | } 61 | return nv21; 62 | } 63 | 64 | /** 65 | * bitmap转化为bgr数据,格式为{@link Bitmap.Config#ARGB_8888} 66 | * 67 | * @param image 传入的bitmap 68 | * @return bgr数据 69 | */ 70 | public static byte[] bitmapToBgr(Bitmap image) { 71 | if (image == null) { 72 | return null; 73 | } 74 | int bytes = image.getByteCount(); 75 | 76 | ByteBuffer buffer = ByteBuffer.allocate(bytes); 77 | image.copyPixelsToBuffer(buffer); 78 | byte[] temp = buffer.array(); 79 | byte[] pixels = new byte[(temp.length / 4) * 3]; 80 | for (int i = 0; i < temp.length / 4; i++) { 81 | pixels[i * 3] = temp[i * 4 + 2]; 82 | pixels[i * 3 + 1] = temp[i * 4 + 1]; 83 | pixels[i * 3 + 2] = temp[i * 4]; 84 | } 85 | return pixels; 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/util/BitmapUtil.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.util; 2 | 3 | import android.graphics.Bitmap; 4 | import android.graphics.BitmapFactory; 5 | import android.graphics.drawable.BitmapDrawable; 6 | 7 | import java.lang.ref.SoftReference; 8 | import java.util.HashMap; 9 | import java.util.Map; 10 | 11 | /** 12 | * Bitmap的处理 解决out of memory的一些问题: 13 | *

14 | * 先使用软引用:把图片保存在内存之中 用到时候先去找,找不到再从路径加载 15 | *

16 | * 有个独立的释放函数 如果不用了 请记得调用释放函数 17 | */ 18 | public class BitmapUtil { 19 | private static Map> bitmapCache = new HashMap>(); 20 | 21 | public static Bitmap loadBitmap(String path) { 22 | if (bitmapCache.containsKey(path)) { 23 | SoftReference softReference = bitmapCache.get(path); 24 | Bitmap bitmap = softReference.get(); 25 | if (null != bitmap) { 26 | return bitmap; 27 | } 28 | } 29 | BitmapFactory.Options options = new BitmapFactory.Options(); 30 | options.inJustDecodeBounds = false; 31 | options.inSampleSize = 3; 32 | options.inDither = false; 33 | options.inPreferredConfig = Bitmap.Config.ARGB_8888; 34 | Bitmap bitmap = BitmapFactory.decodeFile(path, options); 35 | bitmapCache.put(path, new SoftReference(bitmap)); 36 | return bitmap; 37 | } 38 | 39 | public static BitmapDrawable decodeImage(String path) { 40 | return new BitmapDrawable(loadBitmap(path)); 41 | } 42 | 43 | public static void releaseBitmap(String path) { 44 | if (bitmapCache.containsKey(path)) { 45 | SoftReference softReference = bitmapCache.get(path); 46 | Bitmap bitmap = softReference.get(); 47 | if (null != bitmap) { 48 | bitmap.recycle(); // 回收bitmap的内存 49 | bitmap = null; 50 | } 51 | bitmapCache.remove(path); 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/util/ConfigUtil.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.util; 2 | 3 | import android.content.Context; 4 | import android.content.SharedPreferences; 5 | import com.arcsoft.face.enums.DetectFaceOrientPriority; 6 | 7 | public class ConfigUtil { 8 | private static final String APP_NAME = "ArcFaceDemo"; 9 | private static final String TRACKED_FACE_COUNT = "trackedFaceCount"; 10 | private static final String FT_ORIENT = "ftOrientPriority"; 11 | 12 | public static boolean setTrackedFaceCount(Context context, int trackedFaceCount) { 13 | if (context == null) { 14 | return false; 15 | } 16 | SharedPreferences sharedPreferences = context.getSharedPreferences(APP_NAME, Context.MODE_PRIVATE); 17 | return sharedPreferences.edit() 18 | .putInt(TRACKED_FACE_COUNT, trackedFaceCount) 19 | .commit(); 20 | } 21 | 22 | public static int getTrackedFaceCount(Context context) { 23 | if (context == null) { 24 | return 0; 25 | } 26 | SharedPreferences sharedPreferences = context.getSharedPreferences(APP_NAME, Context.MODE_PRIVATE); 27 | return sharedPreferences.getInt(TRACKED_FACE_COUNT, 0); 28 | } 29 | 30 | public static boolean setFtOrient(Context context, DetectFaceOrientPriority ftOrient) { 31 | if (context == null) { 32 | return false; 33 | } 34 | SharedPreferences sharedPreferences = context.getSharedPreferences(APP_NAME, Context.MODE_PRIVATE); 35 | return sharedPreferences.edit() 36 | .putString(FT_ORIENT, ftOrient.name()) 37 | .commit(); 38 | } 39 | 40 | public static DetectFaceOrientPriority getFtOrient(Context context) { 41 | if (context == null) { 42 | return DetectFaceOrientPriority.ASF_OP_270_ONLY; 43 | } 44 | SharedPreferences sharedPreferences = context.getSharedPreferences(APP_NAME, Context.MODE_PRIVATE); 45 | return DetectFaceOrientPriority.valueOf(sharedPreferences.getString(FT_ORIENT, DetectFaceOrientPriority.ASF_OP_270_ONLY.name())); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/util/CopyFileToSD.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.util; 2 | 3 | import android.os.Environment; 4 | 5 | import java.io.File; 6 | import java.io.FileInputStream; 7 | import java.io.FileOutputStream; 8 | import java.io.IOException; 9 | 10 | /** 11 | * 复制相关内容到SD卡中以便可视化查看 12 | * Created by MJCoder on 2017-10-09. 13 | */ 14 | public class CopyFileToSD { 15 | /** 16 | * 将过大的内容或是过长的字符串复制到SD卡中以便可视化查看 17 | * 18 | * @param fileContent 过大的内容或是过长的字符串(例如:json、log、服务端返回的大数据等) 19 | * @param fileName 复制到SD卡的文件名称(切记:需要包含后缀) 20 | */ 21 | public static void txtFile(String fileContent, String fileName) { 22 | FileOutputStream fos = null; 23 | try { 24 | //文件复制到sd卡中 25 | fos = new FileOutputStream(Environment.getExternalStorageDirectory().getAbsolutePath() + fileName); 26 | fos.write(fileContent.getBytes()); //将String字符串以字节流的形式写入到输出流中 27 | fos.close(); 28 | fos.flush(); 29 | } catch (Exception e) { 30 | e.printStackTrace(); 31 | } finally { 32 | //关闭数据流 33 | try { 34 | if (fos != null) 35 | fos.close(); 36 | } catch (IOException e) { 37 | e.printStackTrace(); 38 | } 39 | 40 | } 41 | } 42 | 43 | /** 44 | * 将Database文件复制到SD卡中以便可视化查看 45 | * 46 | * @param packageName 该APP的包名 47 | * @param databaseName Database文件的名称(切记:仅仅是名称不包含后缀) 48 | */ 49 | public static void databaseFile(String packageName, String databaseName) { 50 | //找到文件的路径 /data/data/包名/databases/数据库名称 51 | File databaseFile = new File(Environment.getDataDirectory().getAbsolutePath() + "/data/" + packageName + "/databases/" + databaseName + ".db"); 52 | FileInputStream fis = null; 53 | FileOutputStream fos = null; 54 | try { 55 | //文件复制到sd卡中 56 | fis = new FileInputStream(databaseFile); 57 | fos = new FileOutputStream(Environment.getExternalStorageDirectory().getAbsolutePath() + "/" + databaseName + ".db"); 58 | int len = 0; 59 | byte[] buffer = new byte[2048]; 60 | while (-1 != (len = fis.read(buffer))) { 61 | fos.write(buffer, 0, len); 62 | } 63 | fos.flush(); 64 | } catch (Exception e) { 65 | e.printStackTrace(); 66 | } finally { 67 | //关闭数据流 68 | try { 69 | if (fos != null) 70 | fos.close(); 71 | if (fis != null) 72 | fis.close(); 73 | } catch (IOException e) { 74 | e.printStackTrace(); 75 | } 76 | 77 | } 78 | } 79 | 80 | 81 | /** 82 | * 将SharedPrefs文件复制到SD卡中以便可视化查看 83 | * 84 | * @param packageName 该APP的包名 85 | * @param sharedPrefsName SharedPrefs文件的名称(切记:仅仅是名称不包含后缀) 86 | */ 87 | public static void sharedPrefsFile(String packageName, String sharedPrefsName) { 88 | //找到文件的路径 /data/data/包名/databases/数据库名称 89 | File sharedPrefsFile = new File(Environment.getDataDirectory().getAbsolutePath() + "/data/" + packageName + "/shared_prefs/" + sharedPrefsName + ".xml"); 90 | FileInputStream fis = null; 91 | FileOutputStream fos = null; 92 | try { 93 | //文件复制到sd卡中 94 | fis = new FileInputStream(sharedPrefsFile); 95 | fos = new FileOutputStream(Environment.getExternalStorageDirectory().getAbsolutePath() + "/" + sharedPrefsName + ".xml"); 96 | int len = 0; 97 | byte[] buffer = new byte[2048]; 98 | while (-1 != (len = fis.read(buffer))) { 99 | fos.write(buffer, 0, len); 100 | } 101 | fos.flush(); 102 | } catch (Exception e) { 103 | e.printStackTrace(); 104 | } finally { 105 | //关闭数据流 106 | try { 107 | if (fos != null) 108 | fos.close(); 109 | if (fis != null) 110 | fis.close(); 111 | } catch (IOException e) { 112 | e.printStackTrace(); 113 | } 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/util/FileUtil.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.util; 2 | 3 | import android.content.Context; 4 | import android.os.Environment; 5 | import android.os.storage.StorageManager; 6 | 7 | import java.io.File; 8 | import java.lang.reflect.Method; 9 | 10 | /** 11 | * Created by MJCoder on 2019-03-14. 12 | */ 13 | 14 | public class FileUtil { 15 | 16 | /** 17 | * 获取新建的文件 18 | * 19 | * @param context 环境上下文 20 | * @param dirName 新建的文件所在的上级目录;可以为空(为空时该文件将直接插入项目的根目录) 21 | * @param fileName 新建的文件名:可以为空(为空时返回的时目录) 22 | * @return 23 | */ 24 | public static File getFile(Context context, String dirName, String fileName) { 25 | File currentFile = null; 26 | try { 27 | if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { 28 | File dir; 29 | if (dirName != null) { 30 | dir = new File(Environment.getExternalStorageDirectory(), "AttendanceSystem/" + dirName); 31 | } else { 32 | dir = new File(Environment.getExternalStorageDirectory(), "AttendanceSystem"); 33 | } 34 | if (!dir.exists()) { 35 | dir.mkdirs(); 36 | } 37 | // File[] files = dir.listFiles();//获取文件列表 38 | // for (int i = 0; i < files.length; i++) { 39 | // files[i].delete();//删除该文档下的所有文件 40 | // } 41 | if (fileName != null) { 42 | currentFile = new File(dir, fileName); 43 | if (!currentFile.exists()) { 44 | currentFile.createNewFile(); 45 | } 46 | } else { 47 | currentFile = dir; 48 | } 49 | } else { 50 | String dirTemp = null; 51 | StorageManager storageManager = (StorageManager) context.getSystemService(Context.STORAGE_SERVICE); 52 | Class[] paramClasses = {}; 53 | Method getVolumePathsMethod; 54 | getVolumePathsMethod = StorageManager.class.getMethod("getVolumePaths", paramClasses); 55 | // 在反射调用之前将此对象的 accessible 标志设置为 true,以此来提升反射速度。 56 | getVolumePathsMethod.setAccessible(true); 57 | Object[] params = {}; 58 | Object invoke = getVolumePathsMethod.invoke(storageManager, params); 59 | for (int i = 0; i < ((String[]) invoke).length; i++) { 60 | if (!((String[]) invoke)[i].equals(Environment.getExternalStorageDirectory().toString())) { 61 | dirTemp = ((String[]) invoke)[i]; 62 | } 63 | } 64 | File dir; 65 | if (dirName != null) { 66 | dir = new File(dirTemp, "AttendanceSystem/" + dirName); 67 | } else { 68 | dir = new File(dirTemp, "AttendanceSystem"); 69 | } 70 | if (!dir.exists()) { 71 | dir.mkdirs(); 72 | } 73 | // File[] files = dir.listFiles();//获取文件列表 74 | // for (int i = 0; i < files.length; i++) { 75 | // files[i].delete();//删除该文档下的所有文件 76 | // } 77 | if (fileName != null) { 78 | currentFile = new File(dir, fileName); 79 | if (!currentFile.exists()) { 80 | currentFile.createNewFile(); 81 | } 82 | } else { 83 | currentFile = dir; 84 | } 85 | } 86 | } catch (Exception e) { 87 | e.printStackTrace(); 88 | } 89 | return currentFile; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /app/src/main/java/com/lzf/attendancesystem/util/ScreenUtils.java: -------------------------------------------------------------------------------- 1 | package com.lzf.attendancesystem.util; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | import android.graphics.Rect; 6 | import android.util.DisplayMetrics; 7 | 8 | /** 9 | * 手机屏幕工具类:可用于多机型适配 10 | * 11 | * @author MJCoder 12 | */ 13 | public class ScreenUtils { 14 | /** 15 | * 手机屏幕的宽(widthPixels-像素) 16 | */ 17 | private static int screenW; 18 | /** 19 | * 手机屏幕的高(heightPixels-像素) 20 | */ 21 | private static int screenH; 22 | /** 23 | * 手机屏幕的密度/分辨率 24 | */ 25 | private static float screenDensity; 26 | 27 | /** 28 | * 获取手机屏幕的宽(widthPixels-像素) 29 | * 30 | * @param context 环境/上下文 31 | * @return 手机屏幕的宽(widthPixels-像素) 32 | */ 33 | public static int getScreenW(Context context) { 34 | if (screenW == 0) { 35 | initScreen(context); 36 | } 37 | return screenW; 38 | } 39 | 40 | /** 41 | * 获取手机屏幕的高(heightPixels-像素) 42 | * 43 | * @param context 环境/上下文 44 | * @return 手机屏幕的高(heightPixels-像素) 45 | */ 46 | public static int getScreenH(Context context) { 47 | if (screenH == 0) { 48 | initScreen(context); 49 | } 50 | return screenH; 51 | } 52 | 53 | /** 54 | * 获取手机屏幕的密度/分辨率 55 | * 56 | * @param context 环境/上下文 57 | * @return 手机屏幕的密度/分辨率 58 | */ 59 | public static float getScreenDensity(Context context) { 60 | if (screenDensity == 0) { 61 | initScreen(context); 62 | } 63 | return screenDensity; 64 | } 65 | 66 | /** 67 | * 初始化屏幕信息;并初始化赋值屏幕的宽(widthPixels-像素)、高(heightPixels-像素)、密度/分辨率 68 | * 69 | * @param context 环境/上下文 70 | */ 71 | private static void initScreen(Context context) { 72 | DisplayMetrics metric = context.getResources().getDisplayMetrics(); 73 | screenW = metric.widthPixels; 74 | screenH = metric.heightPixels; 75 | screenDensity = metric.density; 76 | } 77 | 78 | /** 79 | * 根据手机的密度/分辨率将以 dp 为单位的值转换为以 px-像素 为单位的值 80 | * 81 | * @param context 环境/上下文 82 | * @param dpValue 以 dp 为单位的值 83 | * @return 以 px-像素 为单位的值 84 | */ 85 | public static int dp2px(Context context, float dpValue) { 86 | return (int) (dpValue * getScreenDensity(context) + 0.5f); 87 | } 88 | 89 | /** 90 | * 根据手机的密度/分辨率将以 px-像素 为单位的值转换为以 dp 为单位的值 91 | * 92 | * @param context 环境/上下文 93 | * @param pxValue 以 px-像素 为单位的值 94 | * @return 以 dp 为单位的值 95 | */ 96 | public static int px2dp(Context context, float pxValue) { 97 | return (int) (pxValue / getScreenDensity(context) + 0.5f); 98 | } 99 | 100 | /** 101 | * 根据手机的密度/分辨率将以 sp 为单位的值转换为以 px-像素 为单位的值 102 | * 103 | * @param context 环境/上下文 104 | * @param spValue 以 sp 为单位的值 105 | * @return 以 px-像素 为单位的值 106 | */ 107 | public static int sp2px(Context context, float spValue) { 108 | final float fontScale = context.getResources().getDisplayMetrics().scaledDensity; 109 | return (int) (spValue * fontScale + 0.5f); 110 | } 111 | 112 | /** 113 | * 计算状态栏高度 114 | * 115 | * @param activity 当前界面的Activity 116 | * @return 状态栏高度 117 | * @see Activity 118 | */ 119 | public static int getStatusBarHeight(Activity activity) { 120 | Rect frame = new Rect(); 121 | activity.getWindow().getDecorView().getWindowVisibleDisplayFrame(frame); 122 | return frame.top; 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/arm64-v8a/libAMapSDK_MAP_v7_2_1.so: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:9b3025f2629a5ccbc09a6e91444701d9511d37f4ae15a0cc78a2577e696494c5 3 | size 6251896 4 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/arm64-v8a/libarcsoft_face.so: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:02dd8e3830d5ab99c6955d6e8baeb0f7e282d8addd4a729c4bff12a91bd51acc 3 | size 42167760 4 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/arm64-v8a/libarcsoft_face_engine.so: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:c23bf080560c3460f0013f8db1cf571b6a929f2c452aefb922eba6aca06323a7 3 | size 1477200 4 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/arm64-v8a/libarcsoft_image_util.so: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:b679f1143e00cf1739e3df493430b956097a270a01cf6e6a36050c929bd1bc1e 3 | size 79272 4 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libAMapSDK_MAP_v7_2_1.so: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:899a3d3793b94884b2490d51d5efb7732797d6e400491685be8c542792982731 3 | size 2280233 4 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libarcsoft_face.so: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:39609e2fd472ab358a7d7fa9f23699ca2b07087315fbc6cfccc37738f193ddc8 3 | size 41790380 4 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libarcsoft_face_engine.so: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:e7befe9b9ba5cac189891eedefe98ed2eca0fedf28063adea0f3acac0928bb4d 3 | size 915572 4 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi-v7a/libarcsoft_image_util.so: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:57524c6c16906470fe0f06a40b8faa7266e762acb37377f0c9759675189566f3 3 | size 143860 4 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/armeabi/libAMapSDK_MAP_v7_2_1.so: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:899a3d3793b94884b2490d51d5efb7732797d6e400491685be8c542792982731 3 | size 2280233 4 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/x86/libAMapSDK_MAP_v7_2_1.so: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:0a439aa5bc7e6002c26f357a59b272c1a6000c9cfa09f136ce59a321b7fff541 3 | size 2940052 4 | -------------------------------------------------------------------------------- /app/src/main/jniLibs/x86_64/libAMapSDK_MAP_v7_2_1.so: -------------------------------------------------------------------------------- 1 | version https://git-lfs.github.com/spec/v1 2 | oid sha256:1b62177948a4b0452366cc0b958b96f169adf0e28624f85e0dc76f305f5fd3d2 3 | size 3207292 4 | -------------------------------------------------------------------------------- /app/src/main/res/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MJCoderMJCoder/AttendanceSystem--/1d4692226bd65e35378b7d17bcad962dc4d8c631/app/src/main/res/delete.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/fa_recognition.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 13 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add_a_photo_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_autorenew_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_location_on_black_24dp.xml: -------------------------------------------------------------------------------- 1 | 4 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/rounded_rectangle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/rounded_rectangle_border.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/success.xml: -------------------------------------------------------------------------------- 1 | 7 | 10 | 13 | 16 | 19 | 22 | 25 | 28 | 31 | 34 | 37 | 40 | 43 | 46 | 49 | 52 | 55 | 58 | 61 | 64 | 67 | 70 | 71 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_admin_login.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 17 | 18 | 27 | 28 | 29 | 36 | 37 | 43 | 44 | 57 | 58 | 59 | 60 | 65 | 66 | 82 | 83 | 84 | 85 | 90 | 91 |