Parcourir la source

-Change Package Name
-Add new url checking card

ilhamitubagoes il y a 4 ans
Parent
commit
e5da8cfde7
56 fichiers modifiés avec 183 ajouts et 181 suppressions
  1. 1 1
      app/build.gradle
  2. 1 1
      app/src/androidTest/java/com/fusi24/rfid/DeviceUnitTest.java
  3. 1 1
      app/src/androidTest/java/com/fusi24/rfid/ExampleInstrumentedTest.java
  4. 1 1
      app/src/main/AndroidManifest.xml
  5. 4 4
      app/src/main/java/com/fusi24/rfid/BaseApplication.java
  6. 5 5
      app/src/main/java/com/fusi24/rfid/SplashScreenActivity.java
  7. 4 4
      app/src/main/java/com/fusi24/rfid/adapter/ProblemDocumentAdapter.java
  8. 5 5
      app/src/main/java/com/fusi24/rfid/adapter/ProblemGroupAdapter.java
  9. 3 3
      app/src/main/java/com/fusi24/rfid/adapter/SiteAdapter.java
  10. 3 3
      app/src/main/java/com/fusi24/rfid/adapter/StatusScanAdapter.java
  11. 7 7
      app/src/main/java/com/fusi24/rfid/base/BaseActivity.java
  12. 1 1
      app/src/main/java/com/fusi24/rfid/base/BasePresenter.java
  13. 1 1
      app/src/main/java/com/fusi24/rfid/base/BaseView.java
  14. 1 1
      app/src/main/java/com/fusi24/rfid/base/Presenter.java
  15. 7 5
      app/src/main/java/com/fusi24/rfid/config/Constant.java
  16. 9 9
      app/src/main/java/com/fusi24/rfid/data/DataManager.java
  17. 1 1
      app/src/main/java/com/fusi24/rfid/data/SessionManager.java
  18. 10 10
      app/src/main/java/com/fusi24/rfid/data/api/RestService.java
  19. 3 3
      app/src/main/java/com/fusi24/rfid/data/api/RestServiceFactory.java
  20. 1 1
      app/src/main/java/com/fusi24/rfid/data/entity/DataAuth.java
  21. 1 1
      app/src/main/java/com/fusi24/rfid/data/entity/DataCategory.java
  22. 1 1
      app/src/main/java/com/fusi24/rfid/data/entity/DataCompany.java
  23. 1 1
      app/src/main/java/com/fusi24/rfid/data/entity/DataDetail.java
  24. 1 1
      app/src/main/java/com/fusi24/rfid/data/entity/DataDevice.java
  25. 1 1
      app/src/main/java/com/fusi24/rfid/data/entity/DataDocumentType.java
  26. 1 1
      app/src/main/java/com/fusi24/rfid/data/entity/DataEmployee.java
  27. 1 1
      app/src/main/java/com/fusi24/rfid/data/entity/DataEntryPermit.java
  28. 1 1
      app/src/main/java/com/fusi24/rfid/data/entity/DataFunctionalPosition.java
  29. 1 1
      app/src/main/java/com/fusi24/rfid/data/entity/DataGate.java
  30. 1 1
      app/src/main/java/com/fusi24/rfid/data/entity/DataGroup.java
  31. 1 1
      app/src/main/java/com/fusi24/rfid/data/entity/DataProblems.java
  32. 1 1
      app/src/main/java/com/fusi24/rfid/data/entity/DataResultRfid.java
  33. 1 1
      app/src/main/java/com/fusi24/rfid/data/entity/DataSite.java
  34. 1 1
      app/src/main/java/com/fusi24/rfid/data/entity/DataStructuralPosition.java
  35. 1 1
      app/src/main/java/com/fusi24/rfid/data/entity/DataUser.java
  36. 6 6
      app/src/main/java/com/fusi24/rfid/ui/ScanActivity.java
  37. 14 14
      app/src/main/java/com/fusi24/rfid/ui/home/HomeActivity.java
  38. 3 3
      app/src/main/java/com/fusi24/rfid/ui/home/HomePresenter.java
  39. 16 0
      app/src/main/java/com/fusi24/entryPermitScanner/ui/home/HomeView.java
  40. 3 3
      app/src/main/java/com/fusi24/rfid/ui/login/ErrorLoginActivity.java
  41. 7 7
      app/src/main/java/com/fusi24/rfid/ui/login/LoginActivity.java
  42. 4 4
      app/src/main/java/com/fusi24/rfid/ui/login/LoginPresenter.java
  43. 10 0
      app/src/main/java/com/fusi24/entryPermitScanner/ui/login/LoginView.java
  44. 10 10
      app/src/main/java/com/fusi24/rfid/ui/scanresult/ScanResultActivity.java
  45. 3 3
      app/src/main/java/com/fusi24/rfid/ui/scanresult/ScanResultPresenter.java
  46. 10 0
      app/src/main/java/com/fusi24/entryPermitScanner/ui/scanresult/ScanResultView.java
  47. 1 1
      app/src/main/java/com/fusi24/rfid/util/DateHelper.java
  48. 1 1
      app/src/main/java/com/fusi24/rfid/util/Helper.java
  49. 2 2
      app/src/main/java/com/fusi24/rfid/util/LFScanProcessing.java
  50. 4 4
      app/src/main/java/com/fusi24/rfid/util/LFSerialPortActivity.java
  51. 2 2
      app/src/main/java/com/fusi24/rfid/util/PowerUtil.java
  52. 0 16
      app/src/main/java/com/fusi24/rfid/ui/home/HomeView.java
  53. 0 10
      app/src/main/java/com/fusi24/rfid/ui/login/LoginView.java
  54. 0 10
      app/src/main/java/com/fusi24/rfid/ui/scanresult/ScanResultView.java
  55. 2 2
      app/src/test/java/com/fusi24/rfid/DateHelperUnitTest.java
  56. 1 1
      app/src/test/java/com/fusi24/rfid/ScanResultUnitTest.java

+ 1 - 1
app/build.gradle

@@ -6,7 +6,7 @@ android {
6 6
     compileSdkVersion 29
7 7
     buildToolsVersion "29.0.3"
8 8
     defaultConfig {
9
-        applicationId "com.fusi24.rfid"
9
+        applicationId "com.fusi24.entryPermitScanner"
10 10
         minSdkVersion 21
11 11
         targetSdkVersion 29
12 12
         versionCode gitVersionCode

+ 1 - 1
app/src/androidTest/java/com/fusi24/rfid/DeviceUnitTest.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid;
1
+package com.fusi24.entryPermitScanner;
2 2
 
3 3
 import android.os.Build;
4 4
 

+ 1 - 1
app/src/androidTest/java/com/fusi24/rfid/ExampleInstrumentedTest.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid;
1
+package com.fusi24.entryPermitScanner;
2 2
 
3 3
 import android.content.Context;
4 4
 

+ 1 - 1
app/src/main/AndroidManifest.xml

@@ -1,6 +1,6 @@
1 1
 <?xml version="1.0" encoding="utf-8"?>
2 2
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
3
-    package="com.fusi24.rfid">
3
+    package="com.fusi24.entryPermitScanner">
4 4
 
5 5
     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
6 6
     <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

+ 4 - 4
app/src/main/java/com/fusi24/rfid/BaseApplication.java

@@ -1,11 +1,11 @@
1
-package com.fusi24.rfid;
1
+package com.fusi24.entryPermitScanner;
2 2
 
3 3
 import android.app.Application;
4 4
 import android.content.Context;
5 5
 
6
-import com.fusi24.rfid.data.entity.DataDetail;
7
-import com.fusi24.rfid.data.entity.DataEntryPermit;
8
-import com.fusi24.rfid.data.entity.DataSite;
6
+import com.fusi24.entryPermitScanner.data.entity.DataDetail;
7
+import com.fusi24.entryPermitScanner.data.entity.DataEntryPermit;
8
+import com.fusi24.entryPermitScanner.data.entity.DataSite;
9 9
 
10 10
 import java.util.ArrayList;
11 11
 import java.util.List;

+ 5 - 5
app/src/main/java/com/fusi24/rfid/SplashScreenActivity.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid;
1
+package com.fusi24.entryPermitScanner;
2 2
 
3 3
 import android.app.Activity;
4 4
 import android.content.Intent;
@@ -7,10 +7,10 @@ import android.os.Handler;
7 7
 
8 8
 import androidx.annotation.Nullable;
9 9
 
10
-import com.fusi24.rfid.base.BaseActivity;
11
-import com.fusi24.rfid.data.SessionManager;
12
-import com.fusi24.rfid.ui.home.HomeActivity;
13
-import com.fusi24.rfid.ui.login.LoginActivity;
10
+import com.fusi24.entryPermitScanner.base.BaseActivity;
11
+import com.fusi24.entryPermitScanner.data.SessionManager;
12
+import com.fusi24.entryPermitScanner.ui.home.HomeActivity;
13
+import com.fusi24.entryPermitScanner.ui.login.LoginActivity;
14 14
 
15 15
 public class SplashScreenActivity extends BaseActivity {
16 16
 

+ 4 - 4
app/src/main/java/com/fusi24/rfid/adapter/ProblemDocumentAdapter.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.adapter;
1
+package com.fusi24.entryPermitScanner.adapter;
2 2
 
3 3
 import android.content.Context;
4 4
 import android.text.TextUtils;
@@ -10,9 +10,9 @@ import android.widget.Filterable;
10 10
 import androidx.annotation.NonNull;
11 11
 import androidx.recyclerview.widget.RecyclerView;
12 12
 
13
-import com.fusi24.rfid.data.entity.DataProblems;
14
-import com.fusi24.rfid.databinding.RowDocumentBinding;
15
-import com.fusi24.rfid.util.DateHelper;
13
+import com.fusi24.entryPermitScanner.data.entity.DataProblems;
14
+import com.fusi24.entryPermitScanner.databinding.RowDocumentBinding;
15
+import com.fusi24.entryPermitScanner.util.DateHelper;
16 16
 
17 17
 import java.util.ArrayList;
18 18
 import java.util.List;

+ 5 - 5
app/src/main/java/com/fusi24/rfid/adapter/ProblemGroupAdapter.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.adapter;
1
+package com.fusi24.entryPermitScanner.adapter;
2 2
 
3 3
 import android.content.Context;
4 4
 import android.view.LayoutInflater;
@@ -9,10 +9,10 @@ import androidx.annotation.NonNull;
9 9
 import androidx.recyclerview.widget.LinearLayoutManager;
10 10
 import androidx.recyclerview.widget.RecyclerView;
11 11
 
12
-import com.fusi24.rfid.R;
13
-import com.fusi24.rfid.data.entity.DataGroup;
14
-import com.fusi24.rfid.data.entity.DataProblems;
15
-import com.fusi24.rfid.databinding.RowGroupBinding;
12
+import com.fusi24.entryPermitScanner.R;
13
+import com.fusi24.entryPermitScanner.data.entity.DataGroup;
14
+import com.fusi24.entryPermitScanner.data.entity.DataProblems;
15
+import com.fusi24.entryPermitScanner.databinding.RowGroupBinding;
16 16
 
17 17
 import java.util.ArrayList;
18 18
 import java.util.List;

+ 3 - 3
app/src/main/java/com/fusi24/rfid/adapter/SiteAdapter.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.adapter;
1
+package com.fusi24.entryPermitScanner.adapter;
2 2
 
3 3
 import android.content.Context;
4 4
 import android.view.LayoutInflater;
@@ -7,8 +7,8 @@ import android.view.ViewGroup;
7 7
 import androidx.annotation.NonNull;
8 8
 import androidx.recyclerview.widget.RecyclerView;
9 9
 
10
-import com.fusi24.rfid.data.entity.DataSite;
11
-import com.fusi24.rfid.databinding.RowSiteBinding;
10
+import com.fusi24.entryPermitScanner.data.entity.DataSite;
11
+import com.fusi24.entryPermitScanner.databinding.RowSiteBinding;
12 12
 
13 13
 import java.util.ArrayList;
14 14
 import java.util.List;

+ 3 - 3
app/src/main/java/com/fusi24/rfid/adapter/StatusScanAdapter.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.adapter;
1
+package com.fusi24.entryPermitScanner.adapter;
2 2
 
3 3
 import android.content.Context;
4 4
 import android.view.LayoutInflater;
@@ -8,8 +8,8 @@ import android.view.ViewGroup;
8 8
 import androidx.annotation.NonNull;
9 9
 import androidx.recyclerview.widget.RecyclerView;
10 10
 
11
-import com.fusi24.rfid.data.entity.DataDetail;
12
-import com.fusi24.rfid.databinding.RowStatusScanBinding;
11
+import com.fusi24.entryPermitScanner.data.entity.DataDetail;
12
+import com.fusi24.entryPermitScanner.databinding.RowStatusScanBinding;
13 13
 
14 14
 import java.util.ArrayList;
15 15
 import java.util.List;

+ 7 - 7
app/src/main/java/com/fusi24/rfid/base/BaseActivity.java

@@ -1,13 +1,13 @@
1
-package com.fusi24.rfid.base;
1
+package com.fusi24.entryPermitScanner.base;
2 2
 
3 3
 import androidx.appcompat.app.AppCompatActivity;
4 4
 
5
-import com.fusi24.rfid.config.Constant;
6
-import com.fusi24.rfid.data.DataManager;
7
-import com.fusi24.rfid.data.SessionManager;
8
-import com.fusi24.rfid.data.api.RestService;
9
-import com.fusi24.rfid.data.api.RestServiceFactory;
10
-import com.fusi24.rfid.util.Helper;
5
+import com.fusi24.entryPermitScanner.config.Constant;
6
+import com.fusi24.entryPermitScanner.data.DataManager;
7
+import com.fusi24.entryPermitScanner.data.SessionManager;
8
+import com.fusi24.entryPermitScanner.data.api.RestService;
9
+import com.fusi24.entryPermitScanner.data.api.RestServiceFactory;
10
+import com.fusi24.entryPermitScanner.util.Helper;
11 11
 
12 12
 import io.reactivex.Scheduler;
13 13
 import io.reactivex.android.schedulers.AndroidSchedulers;

+ 1 - 1
app/src/main/java/com/fusi24/rfid/base/BasePresenter.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.base;
1
+package com.fusi24.entryPermitScanner.base;
2 2
 
3 3
 import io.reactivex.disposables.CompositeDisposable;
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/base/BaseView.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.base;
1
+package com.fusi24.entryPermitScanner.base;
2 2
 
3 3
 public interface BaseView {
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/base/Presenter.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.base;
1
+package com.fusi24.entryPermitScanner.base;
2 2
 
3 3
 public interface Presenter<V extends BaseView> {
4 4
 

+ 7 - 5
app/src/main/java/com/fusi24/rfid/config/Constant.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.config;
1
+package com.fusi24.entryPermitScanner.config;
2 2
 
3 3
 import android.Manifest;
4 4
 
@@ -20,12 +20,12 @@ public final class Constant {
20 20
     /*===================================================================================================*/
21 21
 
22 22
     // API < 3.0 BUAT TEST DEVICE di FUSI
23
-    public final static String PATH = "/dev/ttyS2";
24
-    public final static String PATHNAME = "/proc/gpiocontrol/set_id";
23
+    /*public final static String PATH = "/dev/ttyS2";
24
+    public final static String PATHNAME = "/proc/gpiocontrol/set_id";*/
25 25
 
26 26
     // API 3.0 BUAT TEST DEVICE di BERAU COAL
27
-    /*public final static String PATH = "/dev/ttyS3"; // Untuk versi 3.0
28
-    public final static String PATHNAME = "/proc/gpiocontrol/set_sam"; // untuk versi 3.0*/
27
+    public final static String PATH = "/dev/ttyS3"; // Untuk versi 3.0
28
+    public final static String PATHNAME = "/proc/gpiocontrol/set_sam"; // untuk versi 3.0
29 29
 
30 30
     /*===================================================================================================*/
31 31
 
@@ -37,6 +37,7 @@ public final class Constant {
37 37
     public final static String SID_ENDPOINT = "/sid";
38 38
     public final static String SID2_ENDPOINT = "/sid2";
39 39
     public final static String RFID_ENDPOINT = "/rfid";
40
+    public final static String RFID_NEW_ENDPOINT = "/new/rfid";
40 41
 
41 42
     public static final String URL_PHOTO = BASE_URL + BEATS2_ENDPOINT + "/file?path=";
42 43
 
@@ -48,6 +49,7 @@ public final class Constant {
48 49
     public final static String SID_ENDPOINT = "/sid";
49 50
     public final static String SID2_ENDPOINT = "/sid2";
50 51
     public final static String RFID_ENDPOINT = "/rfid";
52
+    public final static String RFID_NEW_ENDPOINT = "/new/rfid";
51 53
 
52 54
     public static final String URL_PHOTO = BASE_URL + BEATS2_ENDPOINT + "/file?path=";*/
53 55
 

+ 9 - 9
app/src/main/java/com/fusi24/rfid/data/DataManager.java

@@ -1,12 +1,12 @@
1
-package com.fusi24.rfid.data;
2
-
3
-import com.fusi24.rfid.data.api.RestService;
4
-import com.fusi24.rfid.data.entity.DataAuth;
5
-import com.fusi24.rfid.data.entity.DataDetail;
6
-import com.fusi24.rfid.data.entity.DataDevice;
7
-import com.fusi24.rfid.data.entity.DataEntryPermit;
8
-import com.fusi24.rfid.data.entity.DataResultRfid;
9
-import com.fusi24.rfid.data.entity.DataUser;
1
+package com.fusi24.entryPermitScanner.data;
2
+
3
+import com.fusi24.entryPermitScanner.data.api.RestService;
4
+import com.fusi24.entryPermitScanner.data.entity.DataAuth;
5
+import com.fusi24.entryPermitScanner.data.entity.DataDetail;
6
+import com.fusi24.entryPermitScanner.data.entity.DataDevice;
7
+import com.fusi24.entryPermitScanner.data.entity.DataEntryPermit;
8
+import com.fusi24.entryPermitScanner.data.entity.DataResultRfid;
9
+import com.fusi24.entryPermitScanner.data.entity.DataUser;
10 10
 
11 11
 import java.util.List;
12 12
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/SessionManager.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data;
1
+package com.fusi24.entryPermitScanner.data;
2 2
 
3 3
 import android.content.SharedPreferences;
4 4
 

+ 10 - 10
app/src/main/java/com/fusi24/rfid/data/api/RestService.java

@@ -1,13 +1,13 @@
1
-package com.fusi24.rfid.data.api;
1
+package com.fusi24.entryPermitScanner.data.api;
2 2
 
3
-import com.fusi24.rfid.config.Constant;
4
-import com.fusi24.rfid.data.entity.DataAuth;
5
-import com.fusi24.rfid.data.entity.DataDetail;
6
-import com.fusi24.rfid.data.entity.DataDevice;
7
-import com.fusi24.rfid.data.entity.DataEntryPermit;
8
-import com.fusi24.rfid.data.entity.DataResultRfid;
9
-import com.fusi24.rfid.data.entity.DataSite;
10
-import com.fusi24.rfid.data.entity.DataUser;
3
+import com.fusi24.entryPermitScanner.config.Constant;
4
+import com.fusi24.entryPermitScanner.data.entity.DataAuth;
5
+import com.fusi24.entryPermitScanner.data.entity.DataDetail;
6
+import com.fusi24.entryPermitScanner.data.entity.DataDevice;
7
+import com.fusi24.entryPermitScanner.data.entity.DataEntryPermit;
8
+import com.fusi24.entryPermitScanner.data.entity.DataResultRfid;
9
+import com.fusi24.entryPermitScanner.data.entity.DataSite;
10
+import com.fusi24.entryPermitScanner.data.entity.DataUser;
11 11
 
12 12
 import java.util.List;
13 13
 
@@ -37,7 +37,7 @@ public interface RestService {
37 37
     Observable<List<DataDevice>> getDataDevice(@Query("filter[deviceId]") String deviceId,
38 38
                                                @Query("expand") String[] expand);
39 39
 
40
-    @GET(Constant.SID2_ENDPOINT + Constant.RFID_ENDPOINT + "/permit/check/{number_rfid}")
40
+    @GET(Constant.SID2_ENDPOINT + Constant.RFID_NEW_ENDPOINT + "/permit/check/{number_rfid}")
41 41
     Observable<DataResultRfid> checkRfidCard(@Path("number_rfid") String numberRfid,
42 42
                                              @Query("entryPermitId") Integer permitId,
43 43
                                              @Query("rfidDeviceId") String rfidDeviceId,

+ 3 - 3
app/src/main/java/com/fusi24/rfid/data/api/RestServiceFactory.java

@@ -1,9 +1,9 @@
1
-package com.fusi24.rfid.data.api;
1
+package com.fusi24.entryPermitScanner.data.api;
2 2
 
3 3
 import androidx.annotation.NonNull;
4 4
 
5
-import com.fusi24.rfid.BuildConfig;
6
-import com.fusi24.rfid.config.Constant;
5
+import com.fusi24.entryPermitScanner.BuildConfig;
6
+import com.fusi24.entryPermitScanner.config.Constant;
7 7
 import com.google.gson.Gson;
8 8
 import com.google.gson.GsonBuilder;
9 9
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/entity/DataAuth.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data.entity;
1
+package com.fusi24.entryPermitScanner.data.entity;
2 2
 
3 3
 public class DataAuth {
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/entity/DataCategory.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data.entity;
1
+package com.fusi24.entryPermitScanner.data.entity;
2 2
 
3 3
 public class DataCategory {
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/entity/DataCompany.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data.entity;
1
+package com.fusi24.entryPermitScanner.data.entity;
2 2
 
3 3
 public class DataCompany {
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/entity/DataDetail.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data.entity;
1
+package com.fusi24.entryPermitScanner.data.entity;
2 2
 
3 3
 public class DataDetail {
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/entity/DataDevice.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data.entity;
1
+package com.fusi24.entryPermitScanner.data.entity;
2 2
 
3 3
 public class DataDevice {
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/entity/DataDocumentType.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data.entity;
1
+package com.fusi24.entryPermitScanner.data.entity;
2 2
 
3 3
 public class DataDocumentType {
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/entity/DataEmployee.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data.entity;
1
+package com.fusi24.entryPermitScanner.data.entity;
2 2
 
3 3
 public class DataEmployee {
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/entity/DataEntryPermit.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data.entity;
1
+package com.fusi24.entryPermitScanner.data.entity;
2 2
 
3 3
 import org.jetbrains.annotations.NotNull;
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/entity/DataFunctionalPosition.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data.entity;
1
+package com.fusi24.entryPermitScanner.data.entity;
2 2
 
3 3
 public class DataFunctionalPosition {
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/entity/DataGate.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data.entity;
1
+package com.fusi24.entryPermitScanner.data.entity;
2 2
 
3 3
 import java.util.List;
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/entity/DataGroup.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data.entity;
1
+package com.fusi24.entryPermitScanner.data.entity;
2 2
 
3 3
 public class DataGroup {
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/entity/DataProblems.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data.entity;
1
+package com.fusi24.entryPermitScanner.data.entity;
2 2
 
3 3
 import java.io.Serializable;
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/entity/DataResultRfid.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data.entity;
1
+package com.fusi24.entryPermitScanner.data.entity;
2 2
 
3 3
 import java.util.List;
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/entity/DataSite.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data.entity;
1
+package com.fusi24.entryPermitScanner.data.entity;
2 2
 
3 3
 import org.jetbrains.annotations.NotNull;
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/entity/DataStructuralPosition.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data.entity;
1
+package com.fusi24.entryPermitScanner.data.entity;
2 2
 
3 3
 public class DataStructuralPosition {
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/data/entity/DataUser.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.data.entity;
1
+package com.fusi24.entryPermitScanner.data.entity;
2 2
 
3 3
 public class DataUser {
4 4
 

+ 6 - 6
app/src/main/java/com/fusi24/rfid/ui/ScanActivity.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.ui;
1
+package com.fusi24.entryPermitScanner.ui;
2 2
 
3 3
 import android.Manifest;
4 4
 import android.content.Intent;
@@ -15,11 +15,11 @@ import androidx.annotation.Nullable;
15 15
 import androidx.appcompat.widget.Toolbar;
16 16
 import androidx.core.app.ActivityCompat;
17 17
 
18
-import com.fusi24.rfid.R;
19
-import com.fusi24.rfid.config.Constant;
20
-import com.fusi24.rfid.databinding.ActivityScanBinding;
21
-import com.fusi24.rfid.ui.scanresult.ScanResultActivity;
22
-import com.fusi24.rfid.util.LFScanProcessing;
18
+import com.fusi24.entryPermitScanner.R;
19
+import com.fusi24.entryPermitScanner.config.Constant;
20
+import com.fusi24.entryPermitScanner.databinding.ActivityScanBinding;
21
+import com.fusi24.entryPermitScanner.ui.scanresult.ScanResultActivity;
22
+import com.fusi24.entryPermitScanner.util.LFScanProcessing;
23 23
 import com.google.android.gms.common.ConnectionResult;
24 24
 import com.google.android.gms.common.api.GoogleApiClient;
25 25
 import com.google.android.gms.location.FusedLocationProviderClient;

+ 14 - 14
app/src/main/java/com/fusi24/rfid/ui/home/HomeActivity.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.ui.home;
1
+package com.fusi24.entryPermitScanner.ui.home;
2 2
 
3 3
 import android.Manifest;
4 4
 import android.annotation.SuppressLint;
@@ -24,19 +24,19 @@ import androidx.recyclerview.widget.DefaultItemAnimator;
24 24
 import androidx.recyclerview.widget.LinearLayoutManager;
25 25
 
26 26
 import com.annimon.stream.Stream;
27
-import com.fusi24.rfid.BuildConfig;
28
-import com.fusi24.rfid.R;
29
-import com.fusi24.rfid.SplashScreenActivity;
30
-import com.fusi24.rfid.adapter.SiteAdapter;
31
-import com.fusi24.rfid.adapter.StatusScanAdapter;
32
-import com.fusi24.rfid.base.BaseActivity;
33
-import com.fusi24.rfid.config.Constant;
34
-import com.fusi24.rfid.data.entity.DataDetail;
35
-import com.fusi24.rfid.data.entity.DataDevice;
36
-import com.fusi24.rfid.data.entity.DataEntryPermit;
37
-import com.fusi24.rfid.data.entity.DataSite;
38
-import com.fusi24.rfid.databinding.ActivityHomeBinding;
39
-import com.fusi24.rfid.ui.ScanActivity;
27
+import com.fusi24.entryPermitScanner.BuildConfig;
28
+import com.fusi24.entryPermitScanner.R;
29
+import com.fusi24.entryPermitScanner.SplashScreenActivity;
30
+import com.fusi24.entryPermitScanner.adapter.SiteAdapter;
31
+import com.fusi24.entryPermitScanner.adapter.StatusScanAdapter;
32
+import com.fusi24.entryPermitScanner.base.BaseActivity;
33
+import com.fusi24.entryPermitScanner.config.Constant;
34
+import com.fusi24.entryPermitScanner.data.entity.DataDetail;
35
+import com.fusi24.entryPermitScanner.data.entity.DataDevice;
36
+import com.fusi24.entryPermitScanner.data.entity.DataEntryPermit;
37
+import com.fusi24.entryPermitScanner.data.entity.DataSite;
38
+import com.fusi24.entryPermitScanner.databinding.ActivityHomeBinding;
39
+import com.fusi24.entryPermitScanner.ui.ScanActivity;
40 40
 
41 41
 import java.util.ArrayList;
42 42
 import java.util.List;

+ 3 - 3
app/src/main/java/com/fusi24/rfid/ui/home/HomePresenter.java

@@ -1,7 +1,7 @@
1
-package com.fusi24.rfid.ui.home;
1
+package com.fusi24.entryPermitScanner.ui.home;
2 2
 
3
-import com.fusi24.rfid.base.BasePresenter;
4
-import com.fusi24.rfid.data.DataManager;
3
+import com.fusi24.entryPermitScanner.base.BasePresenter;
4
+import com.fusi24.entryPermitScanner.data.DataManager;
5 5
 
6 6
 import io.reactivex.Scheduler;
7 7
 

+ 16 - 0
app/src/main/java/com/fusi24/entryPermitScanner/ui/home/HomeView.java

@@ -0,0 +1,16 @@
1
+package com.fusi24.entryPermitScanner.ui.home;
2
+
3
+import com.fusi24.entryPermitScanner.base.BaseView;
4
+import com.fusi24.entryPermitScanner.data.entity.DataDetail;
5
+import com.fusi24.entryPermitScanner.data.entity.DataDevice;
6
+import com.fusi24.entryPermitScanner.data.entity.DataEntryPermit;
7
+
8
+import java.util.List;
9
+
10
+public interface HomeView extends BaseView {
11
+
12
+    void showDataPermit(List<DataEntryPermit> dataEntryPermitList);
13
+    void showDataStatusScan(List<DataDetail> dataStatusScanList);
14
+    void showDataDevice(List<DataDevice> dataDevices);
15
+
16
+}

+ 3 - 3
app/src/main/java/com/fusi24/rfid/ui/login/ErrorLoginActivity.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.ui.login;
1
+package com.fusi24.entryPermitScanner.ui.login;
2 2
 
3 3
 import android.os.Bundle;
4 4
 import android.view.MenuItem;
@@ -7,8 +7,8 @@ import android.widget.Toast;
7 7
 
8 8
 import androidx.appcompat.widget.Toolbar;
9 9
 
10
-import com.fusi24.rfid.R;
11
-import com.fusi24.rfid.base.BaseActivity;
10
+import com.fusi24.entryPermitScanner.R;
11
+import com.fusi24.entryPermitScanner.base.BaseActivity;
12 12
 
13 13
 public class ErrorLoginActivity extends BaseActivity {
14 14
 

+ 7 - 7
app/src/main/java/com/fusi24/rfid/ui/login/LoginActivity.java

@@ -1,16 +1,16 @@
1
-package com.fusi24.rfid.ui.login;
1
+package com.fusi24.entryPermitScanner.ui.login;
2 2
 
3 3
 import android.app.Activity;
4 4
 import android.content.Intent;
5 5
 import android.os.Bundle;
6 6
 import android.widget.Toast;
7 7
 
8
-import com.fusi24.rfid.R;
9
-import com.fusi24.rfid.data.SessionManager;
10
-import com.fusi24.rfid.data.entity.DataAuth;
11
-import com.fusi24.rfid.data.entity.DataUser;
12
-import com.fusi24.rfid.util.Helper;
13
-import com.fusi24.rfid.util.LFScanProcessing;
8
+import com.fusi24.entryPermitScanner.R;
9
+import com.fusi24.entryPermitScanner.data.SessionManager;
10
+import com.fusi24.entryPermitScanner.data.entity.DataAuth;
11
+import com.fusi24.entryPermitScanner.data.entity.DataUser;
12
+import com.fusi24.entryPermitScanner.util.Helper;
13
+import com.fusi24.entryPermitScanner.util.LFScanProcessing;
14 14
 
15 15
 import timber.log.Timber;
16 16
 

+ 4 - 4
app/src/main/java/com/fusi24/rfid/ui/login/LoginPresenter.java

@@ -1,8 +1,8 @@
1
-package com.fusi24.rfid.ui.login;
1
+package com.fusi24.entryPermitScanner.ui.login;
2 2
 
3
-import com.fusi24.rfid.base.BasePresenter;
4
-import com.fusi24.rfid.data.DataManager;
5
-import com.fusi24.rfid.data.entity.DataAuth;
3
+import com.fusi24.entryPermitScanner.base.BasePresenter;
4
+import com.fusi24.entryPermitScanner.data.DataManager;
5
+import com.fusi24.entryPermitScanner.data.entity.DataAuth;
6 6
 
7 7
 import io.reactivex.Scheduler;
8 8
 

+ 10 - 0
app/src/main/java/com/fusi24/entryPermitScanner/ui/login/LoginView.java

@@ -0,0 +1,10 @@
1
+package com.fusi24.entryPermitScanner.ui.login;
2
+
3
+import com.fusi24.entryPermitScanner.base.BaseView;
4
+import com.fusi24.entryPermitScanner.data.entity.DataUser;
5
+
6
+public interface LoginView extends BaseView {
7
+
8
+    void showLoginSuccess(DataUser dataUser);
9
+
10
+}

+ 10 - 10
app/src/main/java/com/fusi24/rfid/ui/scanresult/ScanResultActivity.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.ui.scanresult;
1
+package com.fusi24.entryPermitScanner.ui.scanresult;
2 2
 
3 3
 import android.annotation.SuppressLint;
4 4
 import android.content.Intent;
@@ -14,15 +14,15 @@ import androidx.recyclerview.widget.LinearLayoutManager;
14 14
 import com.annimon.stream.Collectors;
15 15
 import com.annimon.stream.Stream;
16 16
 import com.bumptech.glide.Glide;
17
-import com.fusi24.rfid.R;
18
-import com.fusi24.rfid.adapter.ProblemGroupAdapter;
19
-import com.fusi24.rfid.base.BaseActivity;
20
-import com.fusi24.rfid.config.Constant;
21
-import com.fusi24.rfid.data.entity.DataGroup;
22
-import com.fusi24.rfid.data.entity.DataProblems;
23
-import com.fusi24.rfid.data.entity.DataResultRfid;
24
-import com.fusi24.rfid.databinding.ActivityScanResultNewBinding;
25
-import com.fusi24.rfid.ui.home.HomeActivity;
17
+import com.fusi24.entryPermitScanner.R;
18
+import com.fusi24.entryPermitScanner.adapter.ProblemGroupAdapter;
19
+import com.fusi24.entryPermitScanner.base.BaseActivity;
20
+import com.fusi24.entryPermitScanner.config.Constant;
21
+import com.fusi24.entryPermitScanner.data.entity.DataGroup;
22
+import com.fusi24.entryPermitScanner.data.entity.DataProblems;
23
+import com.fusi24.entryPermitScanner.data.entity.DataResultRfid;
24
+import com.fusi24.entryPermitScanner.databinding.ActivityScanResultNewBinding;
25
+import com.fusi24.entryPermitScanner.ui.home.HomeActivity;
26 26
 
27 27
 import java.util.ArrayList;
28 28
 import java.util.List;

+ 3 - 3
app/src/main/java/com/fusi24/rfid/ui/scanresult/ScanResultPresenter.java

@@ -1,7 +1,7 @@
1
-package com.fusi24.rfid.ui.scanresult;
1
+package com.fusi24.entryPermitScanner.ui.scanresult;
2 2
 
3
-import com.fusi24.rfid.base.BasePresenter;
4
-import com.fusi24.rfid.data.DataManager;
3
+import com.fusi24.entryPermitScanner.base.BasePresenter;
4
+import com.fusi24.entryPermitScanner.data.DataManager;
5 5
 
6 6
 import io.reactivex.Scheduler;
7 7
 

+ 10 - 0
app/src/main/java/com/fusi24/entryPermitScanner/ui/scanresult/ScanResultView.java

@@ -0,0 +1,10 @@
1
+package com.fusi24.entryPermitScanner.ui.scanresult;
2
+
3
+import com.fusi24.entryPermitScanner.base.BaseView;
4
+import com.fusi24.entryPermitScanner.data.entity.DataResultRfid;
5
+
6
+public interface ScanResultView extends BaseView {
7
+
8
+    void showDataRfid(DataResultRfid dataResultRfid);
9
+
10
+}

+ 1 - 1
app/src/main/java/com/fusi24/rfid/util/DateHelper.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.util;
1
+package com.fusi24.entryPermitScanner.util;
2 2
 
3 3
 import androidx.annotation.NonNull;
4 4
 

+ 1 - 1
app/src/main/java/com/fusi24/rfid/util/Helper.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid.util;
1
+package com.fusi24.entryPermitScanner.util;
2 2
 
3 3
 import android.content.Context;
4 4
 import android.content.SharedPreferences;

+ 2 - 2
app/src/main/java/com/fusi24/rfid/util/LFScanProcessing.java

@@ -1,11 +1,11 @@
1
-package com.fusi24.rfid.util;
1
+package com.fusi24.entryPermitScanner.util;
2 2
 
3 3
 import android.media.AudioAttributes;
4 4
 import android.media.AudioManager;
5 5
 import android.media.SoundPool;
6 6
 import android.os.Build;
7 7
 
8
-import com.fusi24.rfid.R;
8
+import com.fusi24.entryPermitScanner.R;
9 9
 
10 10
 public abstract class LFScanProcessing extends LFSerialPortActivity {
11 11
 

+ 4 - 4
app/src/main/java/com/fusi24/rfid/util/LFSerialPortActivity.java

@@ -14,14 +14,14 @@
14 14
  * limitations under the License.
15 15
  */
16 16
 
17
-package com.fusi24.rfid.util;
17
+package com.fusi24.entryPermitScanner.util;
18 18
 
19 19
 import android.app.AlertDialog;
20 20
 import android.os.Bundle;
21 21
 
22
-import com.fusi24.rfid.R;
23
-import com.fusi24.rfid.base.BaseActivity;
24
-import com.fusi24.rfid.config.Constant;
22
+import com.fusi24.entryPermitScanner.R;
23
+import com.fusi24.entryPermitScanner.base.BaseActivity;
24
+import com.fusi24.entryPermitScanner.config.Constant;
25 25
 
26 26
 import java.io.IOException;
27 27
 import java.io.InputStream;

+ 2 - 2
app/src/main/java/com/fusi24/rfid/util/PowerUtil.java

@@ -1,6 +1,6 @@
1
-package com.fusi24.rfid.util;
1
+package com.fusi24.entryPermitScanner.util;
2 2
 
3
-import com.fusi24.rfid.config.Constant;
3
+import com.fusi24.entryPermitScanner.config.Constant;
4 4
 
5 5
 import java.io.File;
6 6
 import java.io.FileWriter;

+ 0 - 16
app/src/main/java/com/fusi24/rfid/ui/home/HomeView.java

@@ -1,16 +0,0 @@
1
-package com.fusi24.rfid.ui.home;
2
-
3
-import com.fusi24.rfid.base.BaseView;
4
-import com.fusi24.rfid.data.entity.DataDetail;
5
-import com.fusi24.rfid.data.entity.DataDevice;
6
-import com.fusi24.rfid.data.entity.DataEntryPermit;
7
-
8
-import java.util.List;
9
-
10
-public interface HomeView extends BaseView {
11
-
12
-    void showDataPermit(List<DataEntryPermit> dataEntryPermitList);
13
-    void showDataStatusScan(List<DataDetail> dataStatusScanList);
14
-    void showDataDevice(List<DataDevice> dataDevices);
15
-
16
-}

+ 0 - 10
app/src/main/java/com/fusi24/rfid/ui/login/LoginView.java

@@ -1,10 +0,0 @@
1
-package com.fusi24.rfid.ui.login;
2
-
3
-import com.fusi24.rfid.base.BaseView;
4
-import com.fusi24.rfid.data.entity.DataUser;
5
-
6
-public interface LoginView extends BaseView {
7
-
8
-    void showLoginSuccess(DataUser dataUser);
9
-
10
-}

+ 0 - 10
app/src/main/java/com/fusi24/rfid/ui/scanresult/ScanResultView.java

@@ -1,10 +0,0 @@
1
-package com.fusi24.rfid.ui.scanresult;
2
-
3
-import com.fusi24.rfid.base.BaseView;
4
-import com.fusi24.rfid.data.entity.DataResultRfid;
5
-
6
-public interface ScanResultView extends BaseView {
7
-
8
-    void showDataRfid(DataResultRfid dataResultRfid);
9
-
10
-}

+ 2 - 2
app/src/test/java/com/fusi24/rfid/DateHelperUnitTest.java

@@ -1,6 +1,6 @@
1
-package com.fusi24.rfid;
1
+package com.fusi24.entryPermitScanner;
2 2
 
3
-import com.fusi24.rfid.util.DateHelper;
3
+import com.fusi24.entryPermitScanner.util.DateHelper;
4 4
 
5 5
 import org.junit.Test;
6 6
 

+ 1 - 1
app/src/test/java/com/fusi24/rfid/ScanResultUnitTest.java

@@ -1,4 +1,4 @@
1
-package com.fusi24.rfid;
1
+package com.fusi24.entryPermitScanner;
2 2
 
3 3
 import org.junit.Test;
4 4